Add SKIP_TEST_SERVER macro and skip BuildImageStuckCallbackCancellation (#40448)
Several WSLC tests hang on Windows Server SKUs. Introduce a SKIP_TEST_SERVER() macro alongside the existing SKIP_TEST_ARM64 / SKIP_TEST_UNSTABLE helpers, and use it for: - LoadImage - ImportImage - BuildImageStuckCallbackCancellation (newly skipped; was timing out the wslc fe_release CI session at the 2-hour PhaseTimeout) This replaces the ad-hoc IsWindowsServer() / SKIP_TEST_UNSTABLE blocks with TODO comments that were starting to be sprinkled across the file. Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Ben Hillis committed
May 7, 2026 at 15:48 UTC
17ba5f1a732e4f78b804fa12ace1fa1436940327
2 files changed
+13
-12
test/windows/Common.h
+9
@@ -92,6 +92,15 @@ using namespace std::chrono_literals;
92
} \
93
}
94
95
+#define SKIP_TEST_SERVER() \
96
+ { \
97
+ if (IsWindowsServer()) \
98
+ { \
99
+ LogSkipped("This test is skipped on Windows Server SKUs"); \
100
+ return; \
101
+ } \
102
+ }
103
+
104
#define SKIP_TEST_UNSTABLE() \
105
{ \
106
LogSkipped("This test is skipped because it's unstable"); \
test/windows/WSLCTests.cpp
+4
-12
@@ -1030,12 +1030,7 @@ class WSLCTests
1030
1031
WSLC_TEST_METHOD(LoadImage)
1032
{
1033
- // This test case is hanging on Windows Server SKUs. Skip the test until the issue is resolved.
1034
- // TODO: Remove once the fix is available.
1035
- if (IsWindowsServer())
1036
- {
1037
- SKIP_TEST_UNSTABLE();
1038
- }
1033
+ SKIP_TEST_SERVER();
1034
1035
std::filesystem::path imageTar = GetTestImagePath("hello-world:latest");
1036
wil::unique_handle imageTarFileHandle{
@@ -1126,12 +1121,7 @@ class WSLCTests
1121
1122
WSLC_TEST_METHOD(ImportImage)
1123
{
1129
- // This test case is hanging on Windows Server SKUs. Skip the test until the issue is resolved.
1130
- // TODO: Remove once the fix is available.
1131
- if (IsWindowsServer())
1132
- {
1133
- SKIP_TEST_UNSTABLE();
1134
- }
1124
+ SKIP_TEST_SERVER();
1125
1126
auto cleanup =
1127
wil::scope_exit([&]() { LOG_IF_FAILED(DeleteImageNoThrow("my-hello-world:test", WSLCDeleteImageFlagsNone).first); });
@@ -2760,6 +2750,8 @@ class WSLCTests
2750
2751
WSLC_TEST_METHOD(BuildImageStuckCallbackCancellation)
2752
{
2753
+ SKIP_TEST_SERVER();
2754
+
2755
class StuckBuildProgressCallback
2756
: public Microsoft::WRL::RuntimeClass<Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::ClassicCom>, IProgressCallback>
2757
{