Skip to content

Commit

Permalink
fix core: fix flaky ThreadLocal.SafeThreadLocalWorks test
Browse files Browse the repository at this point in the history
This test was copied from `TaskUsesCorrectInstanceAfterSleep` test. Together with the copying, all `Sleep` times were decreased by 10 times. But one `Sleep` time was left as `3s` instead of `300ms`, which broke the test logic and made the test very slightly flaky.
e69bc71a4fada77c7f4bbaed3773e852e7b42699

Pull Request resolved: #583
  • Loading branch information
egor-bystepdev authored and Anton3 committed May 11, 2024
1 parent 4b7cc18 commit 17cddd7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/engine/thread_local_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ UTEST_MT(ThreadLocal, SafeThreadLocalWorks, 2) {
return SafeLoadThreadLocal();
});

engine::SleepFor(3s);
engine::SleepFor(300ms);

// (6)
EXPECT_NE(pthread_self(), thread1_id);
Expand Down

0 comments on commit 17cddd7

Please sign in to comment.