]> git.ipfire.org Git - thirdparty/pdns.git/commit
dnsdist: Remove a racy test in the AsynchronousHolder unit tests 13126/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, 14 Aug 2023 14:28:26 +0000 (16:28 +0200)
commit46a01548e15dcf8431c32c5f62f4ad6416024b3d
tree5eb30f6b28dc745baa3ac93efb555eb8ff3c6c07
parent24735efc3554ec5dd37b61afebff93fef2b3762b
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)
```

(cherry picked from commit 35bbac75efbd4fb8a9523ab3974bea5507484f65)
pdns/dnsdistdist/test-dnsdistasync.cc