]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fixup unit test for cachedb server expired client timeout with
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Fri, 12 Apr 2024 09:51:00 +0000 (11:51 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Fri, 12 Apr 2024 09:51:00 +0000 (11:51 +0200)
  a check if response if from upstream or from cachedb.

doc/Changelog
testdata/cachedb_expired_client_timeout.crpl

index 88d95b198a559f09e27add6dbaab42f9fa8dfc95..d9d77dcf42ebf029a2f3a836b1f2d04e12145f27 100644 (file)
@@ -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
index fbfa0e65400fa205dfd53462294a44e30978d5d0..23f6dbd79b51ed8a64bf83782110af1d6453b30d 100644 (file)
@@ -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