mirror of
https://github.com/introlab/rtabmap.git
synced 2026-10-06 18:17:47 +08:00
fixing ci flakyness
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user