fixing ci flakyness

This commit is contained in:
matlabbe
2026-06-13 17:01:13 -07:00
parent 0e577b4113
commit 95fbc95052
2 changed files with 4 additions and 7 deletions
+3 -6
View File
@@ -201,18 +201,15 @@ TEST(UThreadTest, Kill)
CountingThread thread;
thread.setMaxIterations(1000);
thread.start();
// Wait a bit
std::this_thread::sleep_for(std::chrono::milliseconds(50));
// Kill the thread
thread.kill();
EXPECT_TRUE(thread.isKilled());
// Wait for it to finish
thread.join();
EXPECT_TRUE(thread.isIdle());
EXPECT_LT(thread.getCounter(), 1000); // Should have stopped early
}