@@ -343,10 +343,12 @@ void cleanup_otel()
343343}
344344
345345#ifdef _WIN32
346- TEST (SingletonTest, DISABLED_Uniqueness)
346+ # define RUN_FAILING_WINDOWS_TEST 0
347347#else
348- TEST (SingletonTest, Uniqueness)
348+ # define RUN_FAILING_WINDOWS_TEST 1
349349#endif
350+
351+ TEST (SingletonTest, Uniqueness)
350352{
351353 do_something ();
352354
@@ -387,6 +389,8 @@ TEST(SingletonTest, Uniqueness)
387389 EXPECT_EQ (span_b_lib_count, 1 );
388390 EXPECT_EQ (span_b_f1_count, 2 );
389391 EXPECT_EQ (span_b_f2_count, 1 );
392+
393+ #if RUN_FAILING_WINDOWS_TEST
390394 EXPECT_EQ (span_c_lib_count, 1 ); // Fails with shared libraries on Windows
391395 EXPECT_EQ (span_c_f1_count, 2 ); // Fails with shared libraries on Windows
392396 EXPECT_EQ (span_c_f2_count, 1 ); // Fails with shared libraries on Windows
@@ -399,14 +403,17 @@ TEST(SingletonTest, Uniqueness)
399403 EXPECT_EQ (span_f_lib_count, 1 ); // Fails with shared libraries on Windows
400404 EXPECT_EQ (span_f_f1_count, 2 ); // Fails with shared libraries on Windows
401405 EXPECT_EQ (span_f_f2_count, 1 ); // Fails with shared libraries on Windows
406+ #endif
402407
403408#ifndef BAZEL_BUILD
409+ # if RUN_FAILING_WINDOWS_TEST
404410 EXPECT_EQ (span_g_lib_count, 1 ); // Fails with shared libraries on Windows
405411 EXPECT_EQ (span_g_f1_count, 2 ); // Fails with shared libraries on Windows
406412 EXPECT_EQ (span_g_f2_count, 1 ); // Fails with shared libraries on Windows
407413 EXPECT_EQ (span_h_lib_count, 1 ); // Fails with shared libraries on Windows
408414 EXPECT_EQ (span_h_f1_count, 2 ); // Fails with shared libraries on Windows
409415 EXPECT_EQ (span_h_f2_count, 1 ); // Fails with shared libraries on Windows
416+ # endif
410417#endif
411418
412419 EXPECT_EQ (unknown_span_count, 0 );
0 commit comments