From 35bbac75efbd4fb8a9523ab3974bea5507484f65 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Mon, 12 Jun 2023 11:04:51 +0200 Subject: [PATCH] dnsdist: Remove a racy test in the AsynchronousHolder unit tests We are adding an expired event so the worker thread of the AsynchronousHolder can pick it up immediately, even before we come back from the call to push(), which leads to a racy test. This was observed on GitHub Actions when running with TSAN: ``` FAIL: testrunner ================ Running 170 test cases... test-dnsdistasync.cc(156): error: in "test_dnsdistasync/test_AddingExpiredEvent": check !holder->empty() has failed *** 1 failure is detected in the test module "unit" FAIL testrunner (exit status: 201) ``` --- pdns/dnsdistdist/test-dnsdistasync.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/pdns/dnsdistdist/test-dnsdistasync.cc b/pdns/dnsdistdist/test-dnsdistasync.cc index 802ba4021d..b1fbebca05 100644 --- a/pdns/dnsdistdist/test-dnsdistasync.cc +++ b/pdns/dnsdistdist/test-dnsdistasync.cc @@ -153,7 +153,6 @@ BOOST_AUTO_TEST_CASE(test_AddingExpiredEvent) sender = query->d_sender; BOOST_REQUIRE(sender != nullptr); holder->push(asyncID, queryID, ttd, std::move(query)); - BOOST_CHECK(!holder->empty()); } // sleep for 20 ms -- 2.47.2