[TSAN] race for system in test websocket.bootstrap_exited (#2757)

This commit is contained in:
Guilherme Lawless 2020-05-06 14:27:44 +01:00 committed by GitHub
commit 6b89f7090d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -782,10 +782,9 @@ TEST (websocket, bootstrap_exited)
nano::util::counted_completion subscribed_completion (1);
std::thread bootstrap_thread ([node1, &system, &bootstrap_started, &subscribed_completion]() {
std::shared_ptr<nano::bootstrap_attempt> attempt;
system.deadline_set (5s);
while (attempt == nullptr)
{
ASSERT_NO_ERROR (system.poll ());
std::this_thread::sleep_for (50ms);
node1->bootstrap_initiator.bootstrap (true, "123abc");
attempt = node1->bootstrap_initiator.current_attempt ();
}