]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#4165] Increase timeouts in memfile_lease_mgr_unittest.cc
authorAndrei Pavel <andrei@isc.org>
Thu, 20 Nov 2025 08:23:09 +0000 (10:23 +0200)
committerAndrei Pavel <andrei@isc.org>
Fri, 21 Nov 2025 17:19:25 +0000 (19:19 +0200)
src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc

index 10d03fa641aa8674715ed6cf8d59d23a995307e5..dc8de3cd0929ce489b2bc012d66c80aa9e2797d5 100644 (file)
@@ -182,7 +182,7 @@ public:
     ///
     /// @return true if the process ended, false otherwise
     bool waitForProcess(const Memfile_LeaseMgr& lease_mgr,
-                        const uint8_t timeout) {
+                        const uint8_t timeout = 5) {
         const uint32_t iterations_max = timeout * 1000;
         IntervalTimer fast_path_timer(io_service_);
         IntervalTimer timer(io_service_);
@@ -652,7 +652,7 @@ TEST_F(MemfileLeaseMgrTest, lfcEnv) {
     ASSERT_NO_THROW(lease_mgr->lfcCallback());
 
     // Wait for the LFC process to complete.
-    ASSERT_TRUE(waitForProcess(*lease_mgr, 1));
+    ASSERT_TRUE(waitForProcess(*lease_mgr));
 
     // And make sure it has returned an exit status of 0.
     EXPECT_EQ(0, lease_mgr->getLFCExitStatus())
@@ -721,7 +721,7 @@ TEST_F(MemfileLeaseMgrTest, leaseFileCleanup4) {
     EXPECT_EQ(new_file_contents, current_file.readFile());
 
     // Wait for the LFC process to complete.
-    ASSERT_TRUE(waitForProcess(*lease_mgr, 2));
+    ASSERT_TRUE(waitForProcess(*lease_mgr));
 
     // And make sure it has returned an exit status of 0.
     EXPECT_EQ(0, lease_mgr->getLFCExitStatus())
@@ -803,7 +803,7 @@ TEST_F(MemfileLeaseMgrTest, leaseFileCleanup6) {
     EXPECT_EQ(new_file_contents, current_file.readFile());
 
     // Wait for the LFC process to complete.
-    ASSERT_TRUE(waitForProcess(*lease_mgr, 2));
+    ASSERT_TRUE(waitForProcess(*lease_mgr));
 
     // And make sure it has returned an exit status of 0.
     EXPECT_EQ(0, lease_mgr->getLFCExitStatus())
@@ -916,7 +916,7 @@ TEST_F(MemfileLeaseMgrTest, leaseFileFinish) {
     EXPECT_EQ(current_file_contents, current_file.readFile());
 
     // Wait for the LFC process to complete.
-    ASSERT_TRUE(waitForProcess(*lease_mgr, 5));
+    ASSERT_TRUE(waitForProcess(*lease_mgr));
 
     // And make sure it has returned an exit status of 0.
     EXPECT_EQ(0, lease_mgr->getLFCExitStatus())
@@ -982,7 +982,7 @@ TEST_F(MemfileLeaseMgrTest, leaseFileCopy) {
     EXPECT_EQ(current_file_contents, current_file.readFile());
 
     // Wait for the LFC process to complete.
-    ASSERT_TRUE(waitForProcess(*lease_mgr, 5));
+    ASSERT_TRUE(waitForProcess(*lease_mgr));
 
     // And make sure it has returned an exit status of 0.
     EXPECT_EQ(0, lease_mgr->getLFCExitStatus())
@@ -2074,7 +2074,7 @@ TEST_F(MemfileLeaseMgrTest, leaseUpgrade4) {
 
     // Wait for the LFC process to complete and
     // make sure it has returned an exit status of 0.
-    ASSERT_TRUE(waitForProcess(*lease_mgr, 2));
+    ASSERT_TRUE(waitForProcess(*lease_mgr));
 
     ASSERT_EQ(0, lease_mgr->getLFCExitStatus())
         << "Executing the LFC process failed: make sure that"
@@ -2159,7 +2159,7 @@ TEST_F(MemfileLeaseMgrTest, leaseUpgrade6) {
 
     // Wait for the LFC process to complete and
     // make sure it has returned an exit status of 0.
-    ASSERT_TRUE(waitForProcess(*lease_mgr, 2));
+    ASSERT_TRUE(waitForProcess(*lease_mgr));
 
     ASSERT_EQ(0, lease_mgr->getLFCExitStatus())
         << "Executing the LFC process failed: make sure that"
@@ -4695,7 +4695,7 @@ TEST_F(MemfileLeaseMgrLogTest, lfcStartHandlerLfcInterval0) {
     EXPECT_EQ(expected, response->str());
 
     // Wait for the LFC process to complete.
-    ASSERT_TRUE(waitForProcess(*lease_mgr, 1));
+    ASSERT_TRUE(waitForProcess(*lease_mgr));
 
     // And make sure it has returned an exit status of 0.
     EXPECT_EQ(0, lease_mgr->getLFCExitStatus())
@@ -4736,7 +4736,7 @@ TEST_F(MemfileLeaseMgrLogTest, lfcStartHandler) {
     EXPECT_EQ(expected, response->str());
 
     // Wait for the LFC process to complete.
-    ASSERT_TRUE(waitForProcess(*lease_mgr, 1));
+    ASSERT_TRUE(waitForProcess(*lease_mgr));
 
     // And make sure it has returned an exit status of 0.
     EXPECT_EQ(0, lease_mgr->getLFCExitStatus())