]> git.ipfire.org Git - thirdparty/pdns.git/commit
dnsdist: Remove a racy test in the AsynchronousHolder unit tests 12905/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 12 Jun 2023 09:04:51 +0000 (11:04 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 12 Jun 2023 09:04:51 +0000 (11:04 +0200)
commit35bbac75efbd4fb8a9523ab3974bea5507484f65
treebccba6325d26c7267f70d2e927e2d785dcf55956
parent7cf3179775b6bff11c027e6d1ff352ece7cfb924
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