From: Jelte Jansen Date: Wed, 14 Mar 2012 16:51:17 +0000 (+0100) Subject: [1779] update comment for increased sleep time X-Git-Tag: trac2351_base~226^2~116^2~126^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bc67fb7ccb6d655fd46272c1dfd89a0e58677035;p=thirdparty%2Fkea.git [1779] update comment for increased sleep time --- diff --git a/src/lib/cache/tests/negative_cache_unittest.cc b/src/lib/cache/tests/negative_cache_unittest.cc index 27f713da61..4935e4a6af 100644 --- a/src/lib/cache/tests/negative_cache_unittest.cc +++ b/src/lib/cache/tests/negative_cache_unittest.cc @@ -83,6 +83,9 @@ TEST_F(NegativeCacheTest, testNXDOMAIN){ EXPECT_GE(soa_ttl.getValue(), 172799); EXPECT_LE(soa_ttl.getValue(), 172800); + // Sleep for 2 seconds. 2 seconds to make sure the final range check + // does not overlap with the original ones (in which case this test + // would erroneously pass if the ttl value is not changed) sleep(2); // Query nonexist.example.com again @@ -209,6 +212,9 @@ TEST_F(NegativeCacheTest, testNoerrorNodata){ messageFromFile(msg_nodata2, "message_nodata_with_soa.wire"); msg_nodata2.makeResponse(); + // Sleep for 2 seconds. 2 seconds to make sure the final range check + // does not overlap with the original ones (in which case this test + // would erroneously pass if the ttl value is not changed) sleep(2); EXPECT_TRUE(cache->lookup(example_dot_com, RRType::MX(), RRClass::IN(), msg_nodata2));