Skip to content

Commit a4ba1fb

Browse files
committed
Restores parallel settings, fixes filename test-args formatting
1 parent 8ee5eb5 commit a4ba1fb

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using NUnit.Framework;
22

3-
[assembly: LevelOfParallelism(10)]
3+
[assembly: LevelOfParallelism(1)]
44
namespace CodexReleaseTests.DataTests
55
{
66
}

Tests/DistTestCore/Configuration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public Configuration()
1414
kubeConfigFile = GetNullableEnvVarOrDefault("KUBECONFIG", null);
1515
logPath = GetEnvVarOrDefault("LOGPATH", "CodexTestLogs");
1616
dataFilesPath = GetEnvVarOrDefault("DATAFILEPATH", "TestDataFiles");
17-
AlwaysDownloadContainerLogs = true; // !string.IsNullOrEmpty(GetEnvVarOrDefault("ALWAYS_LOGS", ""));
17+
AlwaysDownloadContainerLogs = !string.IsNullOrEmpty(GetEnvVarOrDefault("ALWAYS_LOGS", ""));
1818
}
1919

2020
public Configuration(string? kubeConfigFile, string logPath, string dataFilesPath)

Tests/DistTestCore/NameUtils.cs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,23 @@ private static string GetEnvVar(string name, string defaultValue)
5555
private static string FormatArguments(TestContext.TestAdapter test)
5656
{
5757
if (test.Arguments == null || !test.Arguments.Any()) return "";
58-
return $"[{string.Join(',', test.Arguments)}]";
58+
return $"[{string.Join(',', test.Arguments.Select(FormatArgument).ToArray())}]";
59+
}
60+
61+
private static string FormatArgument(object? obj)
62+
{
63+
if (obj == null) return "";
64+
var str = obj.ToString();
65+
if (string.IsNullOrEmpty(str)) return "";
66+
return ReplaceInvalidCharacters(str);
5967
}
6068

6169
private static string ReplaceInvalidCharacters(string name)
6270
{
63-
return name.Replace(":", "_");
71+
return name
72+
.Replace(":", "_")
73+
.Replace("/", "_")
74+
.Replace("\\", "_");
6475
}
6576

6677
private static string DetermineFolder(LogConfig config, DateTime start)

0 commit comments

Comments
 (0)