2
0
mirror of synced 2025-01-26 00:08:57 +00:00

Restores parallel settings, fixes filename test-args formatting

This commit is contained in:
Ben 2024-12-18 09:21:45 +01:00
parent 8ee5eb5767
commit a4ba1fbe2c
No known key found for this signature in database
GPG Key ID: 0F16E812E736C24B
3 changed files with 15 additions and 4 deletions

View File

@ -1,6 +1,6 @@
using NUnit.Framework;
[assembly: LevelOfParallelism(10)]
[assembly: LevelOfParallelism(1)]
namespace CodexReleaseTests.DataTests
{
}

View File

@ -14,7 +14,7 @@ namespace DistTestCore
kubeConfigFile = GetNullableEnvVarOrDefault("KUBECONFIG", null);
logPath = GetEnvVarOrDefault("LOGPATH", "CodexTestLogs");
dataFilesPath = GetEnvVarOrDefault("DATAFILEPATH", "TestDataFiles");
AlwaysDownloadContainerLogs = true; // !string.IsNullOrEmpty(GetEnvVarOrDefault("ALWAYS_LOGS", ""));
AlwaysDownloadContainerLogs = !string.IsNullOrEmpty(GetEnvVarOrDefault("ALWAYS_LOGS", ""));
}
public Configuration(string? kubeConfigFile, string logPath, string dataFilesPath)

View File

@ -55,12 +55,23 @@ namespace DistTestCore
private static string FormatArguments(TestContext.TestAdapter test)
{
if (test.Arguments == null || !test.Arguments.Any()) return "";
return $"[{string.Join(',', test.Arguments)}]";
return $"[{string.Join(',', test.Arguments.Select(FormatArgument).ToArray())}]";
}
private static string FormatArgument(object? obj)
{
if (obj == null) return "";
var str = obj.ToString();
if (string.IsNullOrEmpty(str)) return "";
return ReplaceInvalidCharacters(str);
}
private static string ReplaceInvalidCharacters(string name)
{
return name.Replace(":", "_");
return name
.Replace(":", "_")
.Replace("/", "_")
.Replace("\\", "_");
}
private static string DetermineFolder(LogConfig config, DateTime start)