Skip to content

Commit

Permalink
Merge pull request #13304 from rgacogne/ddist-async-unit-tests-rae
Browse files Browse the repository at this point in the history
dnsdist: Fix a race in the Async unit tests
  • Loading branch information
rgacogne authored Oct 2, 2023
2 parents 727bb9c + f39b15a commit 9a2f8d7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pdns/dnsdistdist/test-dnsdistasync.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class DummyQuerySender : public TCPQuerySender
errorRaised = true;
}

bool errorRaised{false};
std::atomic<bool> errorRaised{false};
};

struct DummyCrossProtocolQuery : public CrossProtocolQuery
Expand Down Expand Up @@ -137,7 +137,7 @@ BOOST_AUTO_TEST_CASE(test_TimeoutFailClose)
}

BOOST_CHECK(holder->empty());
BOOST_CHECK(sender->errorRaised);
BOOST_CHECK(sender->errorRaised.load());

holder->stop();
}
Expand Down Expand Up @@ -170,7 +170,7 @@ BOOST_AUTO_TEST_CASE(test_AddingExpiredEvent)
}

BOOST_CHECK(holder->empty());
BOOST_CHECK(sender->errorRaised);
BOOST_CHECK(sender->errorRaised.load());

holder->stop();
}
Expand Down

0 comments on commit 9a2f8d7

Please sign in to comment.