]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
fix: test: Fix an issue with unreachable cache's unit test
authorArаm Sаrgsyаn <aram@isc.org>
Wed, 3 Dec 2025 10:16:08 +0000 (10:16 +0000)
committerArаm Sаrgsyаn <aram@isc.org>
Wed, 3 Dec 2025 10:16:08 +0000 (10:16 +0000)
The isc_stdtime_now() function used by dns_unreachcache_find() to
check if the entry needs to be expired has a one-second resolution,
and the test sleeps for 1 second and then for the amount of the
expiration interval, which in a worst-case scenario can cause the
test to fail, because the entry was expected to be expired but it
wasn't. Sleep for 2 seconds instead of 1 to avoid the timing
resolution issue.

Closes #5601

Merge branch '5601-unreachable-cache-expire-test-fix' into 'main'

See merge request isc-projects/bind9!11224


Trivial merge