diff --git a/Framework/KubernetesWorkflow/K8sNameUtils.cs b/Framework/KubernetesWorkflow/K8sNameUtils.cs index 2c9b1e52..5be69f7f 100644 --- a/Framework/KubernetesWorkflow/K8sNameUtils.cs +++ b/Framework/KubernetesWorkflow/K8sNameUtils.cs @@ -22,7 +22,9 @@ .Replace("\\", "-") .Replace("[", "-") .Replace("]", "-") - .Replace(",", "-"); + .Replace(",", "-") + .Replace("(", "-") + .Replace(")", "-"); if (result.Length > maxLength) result = result.Substring(0, maxLength); result = result.Trim('-'); diff --git a/Tests/DistTestCore/NameUtils.cs b/Tests/DistTestCore/NameUtils.cs index 44919d51..c742ceec 100644 --- a/Tests/DistTestCore/NameUtils.cs +++ b/Tests/DistTestCore/NameUtils.cs @@ -28,10 +28,11 @@ namespace DistTestCore public static string GetRawFixtureName() { var test = TestContext.CurrentContext.Test; - if (test.ClassName!.Contains("AdhocContext")) return "none"; - var className = test.ClassName!.Substring(test.ClassName.LastIndexOf('.') + 1); - className += FormatArguments(test); - return className.Replace('.', '-'); + var fullName = test.FullName; + if (fullName.Contains("AdhocContext")) return "none"; + var name = fullName.Substring(0, fullName.LastIndexOf('.')); + name += FormatArguments(test); + return name.Replace('.', '-').Replace(',', '-'); } public static string GetCategoryName()