From 99ba38cedaf35a00f66526d4ce14144c46df1035 Mon Sep 17 00:00:00 2001 From: wtgodbe Date: Thu, 19 Dec 2024 14:04:38 -0800 Subject: [PATCH 1/2] Skip tests on internal too --- src/Testing/src/xunit/SkipOnHelixAttribute.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Testing/src/xunit/SkipOnHelixAttribute.cs b/src/Testing/src/xunit/SkipOnHelixAttribute.cs index 38b376cb6808..4ede7441a5f4 100644 --- a/src/Testing/src/xunit/SkipOnHelixAttribute.cs +++ b/src/Testing/src/xunit/SkipOnHelixAttribute.cs @@ -66,7 +66,9 @@ private bool ShouldSkip() return true; } - return Queues.ToLowerInvariant().Split(';').Contains(targetQueue); + // We have "QueueName" and "QueueName.Open" queues for internal and public builds + // If we want to skip the test in the public queue, we want to skip it in the internal queue, and vice versa + return Queues.ToLowerInvariant().Split(';').Any(q => q.Equals(targetQueue) || q.StartsWith(targetQueue) || targetQueue.StartsWith(q)); } public static bool OnHelix() => HelixHelper.OnHelix(); From b50f4bbcd7c0f9dc29e593201f1a86e5260f49ea Mon Sep 17 00:00:00 2001 From: wtgodbe Date: Thu, 19 Dec 2024 14:27:52 -0800 Subject: [PATCH 2/2] StringComparison --- src/Testing/src/xunit/SkipOnHelixAttribute.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Testing/src/xunit/SkipOnHelixAttribute.cs b/src/Testing/src/xunit/SkipOnHelixAttribute.cs index 4ede7441a5f4..2c7b66f75a67 100644 --- a/src/Testing/src/xunit/SkipOnHelixAttribute.cs +++ b/src/Testing/src/xunit/SkipOnHelixAttribute.cs @@ -68,7 +68,8 @@ private bool ShouldSkip() // We have "QueueName" and "QueueName.Open" queues for internal and public builds // If we want to skip the test in the public queue, we want to skip it in the internal queue, and vice versa - return Queues.ToLowerInvariant().Split(';').Any(q => q.Equals(targetQueue) || q.StartsWith(targetQueue) || targetQueue.StartsWith(q)); + return Queues.ToLowerInvariant().Split(';').Any(q => q.Equals(targetQueue, StringComparison.Ordinal) || q.StartsWith(targetQueue, StringComparison.Ordinal) || + targetQueue.StartsWith(q, StringComparison.Ordinal)); } public static bool OnHelix() => HelixHelper.OnHelix();