From: Francis Dupont Date: Thu, 31 Oct 2019 09:01:07 +0000 (+0100) Subject: [985-relax-timings-in-new-config-backend-pull-unit-tests] Relaxed timings and updated... X-Git-Tag: Kea-1.7.2~77 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b41e836256b96b2f1ed7636a29525f0575dcc609;p=thirdparty%2Fkea.git [985-relax-timings-in-new-config-backend-pull-unit-tests] Relaxed timings and updated names --- diff --git a/src/bin/dhcp4/tests/kea_controller_unittest.cc b/src/bin/dhcp4/tests/kea_controller_unittest.cc index 1eca0fd666..70e5248f66 100644 --- a/src/bin/dhcp4/tests/kea_controller_unittest.cc +++ b/src/bin/dhcp4/tests/kea_controller_unittest.cc @@ -287,10 +287,10 @@ public: EXPECT_EQ(expected, result->str()); // No good way to check the rescheduling... - ASSERT_NO_THROW(runTimersWithTimeout(srv->getIOService(), 15)); + ASSERT_NO_THROW(runTimersWithTimeout(srv->getIOService(), 20)); if (config_wait_fetch_time > 0) { - EXPECT_GE(cb_control->getDatabaseConfigFetchCalls(), 12); + EXPECT_GE(cb_control->getDatabaseConfigFetchCalls(), 5); } else { EXPECT_EQ(cb_control->getDatabaseConfigFetchCalls(), 2); } @@ -893,19 +893,19 @@ TEST_F(JSONFileBackendTest, configBackendTimerWithThrow) { // This test verifies that the server will be updated by the // config-backend-pull command. -TEST_F(JSONFileBackendTest, configBackendCommand) { +TEST_F(JSONFileBackendTest, configBackendPullCommand) { testConfigBackendTimer(0, false, true); } // This test verifies that the server will be updated by the // config-backend-pull command even when updates fail. -TEST_F(JSONFileBackendTest, configBackendCommandWithThrow) { +TEST_F(JSONFileBackendTest, configBackendPullCommandWithThrow) { testConfigBackendTimer(0, true, true); } // This test verifies that the server will be updated by the // config-backend-pull command and the timer rescheduled. -TEST_F(JSONFileBackendTest, configBackendCommandWithTimer) { +TEST_F(JSONFileBackendTest, configBackendPullCommandWithTimer) { testConfigBackendTimer(1, false, true); } diff --git a/src/bin/dhcp6/tests/kea_controller_unittest.cc b/src/bin/dhcp6/tests/kea_controller_unittest.cc index 8b89e4cc60..f4c2e683ac 100644 --- a/src/bin/dhcp6/tests/kea_controller_unittest.cc +++ b/src/bin/dhcp6/tests/kea_controller_unittest.cc @@ -273,10 +273,10 @@ public: EXPECT_EQ(expected, result->str()); // No good way to check the rescheduling... - ASSERT_NO_THROW(runTimersWithTimeout(srv->getIOService(), 15)); + ASSERT_NO_THROW(runTimersWithTimeout(srv->getIOService(), 20)); if (config_wait_fetch_time > 0) { - EXPECT_GE(cb_control->getDatabaseConfigFetchCalls(), 12); + EXPECT_GE(cb_control->getDatabaseConfigFetchCalls(), 5); } else { EXPECT_EQ(cb_control->getDatabaseConfigFetchCalls(), 2); } @@ -880,19 +880,19 @@ TEST_F(JSONFileBackendTest, configBackendTimerWithThrow) { // This test verifies that the server will be updated by the // config-backend-pull command. -TEST_F(JSONFileBackendTest, configBackendCommand) { +TEST_F(JSONFileBackendTest, configBackendPullCommand) { testConfigBackendTimer(0, false, true); } // This test verifies that the server will be updated by the // config-backend-pull command even when updates fail. -TEST_F(JSONFileBackendTest, configBackendCommandWithThrow) { +TEST_F(JSONFileBackendTest, configBackendPullCommandWithThrow) { testConfigBackendTimer(0, true, true); } // This test verifies that the server will be updated by the // config-backend-pull command and the timer rescheduled. -TEST_F(JSONFileBackendTest, configBackendCommandWithTimer) { +TEST_F(JSONFileBackendTest, configBackendPullCommandWithTimer) { testConfigBackendTimer(1, false, true); }