From: W.C.A. Wijngaards Date: Fri, 12 Apr 2024 09:51:00 +0000 (+0200) Subject: - Fixup unit test for cachedb server expired client timeout with X-Git-Tag: release-1.20.0rc1~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d530920e09ad13c413cc3c520ac1c8099282e08;p=thirdparty%2Funbound.git - Fixup unit test for cachedb server expired client timeout with a check if response if from upstream or from cachedb. --- diff --git a/doc/Changelog b/doc/Changelog index 88d95b198..d9d77dcf4 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,5 +1,7 @@ 12 April 2024: Wouter - Fix cachedb for serve-expired with serve-expired-client-timeout. + - Fixup unit test for cachedb server expired client timeout with + a check if response if from upstream or from cachedb. 10 April 2024: Wouter - Implement cachedb-check-when-serve-expired: yes option, default diff --git a/testdata/cachedb_expired_client_timeout.crpl b/testdata/cachedb_expired_client_timeout.crpl index fbfa0e654..23f6dbd79 100644 --- a/testdata/cachedb_expired_client_timeout.crpl +++ b/testdata/cachedb_expired_client_timeout.crpl @@ -215,6 +215,10 @@ STEP 40 FLUSH_MESSAGE www2.example.com. IN A ; because of the client timeout, it should be able to use the ; response from cachedb for www2. +; make 2 seconds pass to decrement the TTL on the response, +; the upstream TTL would be 10, cachedb 8. +STEP 48 TIME_PASSES ELAPSE 2 + STEP 50 QUERY ENTRY_BEGIN REPLY RD @@ -229,7 +233,7 @@ REPLY QR RD RA NOERROR SECTION QUESTION www2.example.com. IN A SECTION ANSWER -www2.example.com. 10 IN A 1.2.3.5 +www2.example.com. 8 IN A 1.2.3.5 ENTRY_END ; make both cache and cachedb expired