From: Thomas Markwalder Date: Thu, 22 May 2014 11:50:11 +0000 (-0400) Subject: [master] Disabled forceUDPSendError unit test for Solaris X-Git-Tag: trac3434_base~27 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b8ce9d2676bfd095cc119eeb7b4e0c18bf0b02a6;p=thirdparty%2Fkea.git [master] Disabled forceUDPSendError unit test for Solaris The goal of these tests is to exercise error handling of a failed NCR send in Kea4/Kea6. Because the test is for a UDP sender is there is no simple way to make the send fail. The only way found so far is to attmpt to send it to 0.0.0.0/port 0. This fails everywhere except Solaris 11. For now the tests have been disabled for Solaris 11 --- diff --git a/src/bin/dhcp4/tests/d2_unittest.cc b/src/bin/dhcp4/tests/d2_unittest.cc index baac41fdb8..f9ad81c911 100644 --- a/src/bin/dhcp4/tests/d2_unittest.cc +++ b/src/bin/dhcp4/tests/d2_unittest.cc @@ -287,11 +287,17 @@ TEST_F(Dhcp4SrvD2Test, simpleUDPSend) { EXPECT_EQ(0, mgr.getQueueSize()); } -// Checks that an IO error in sending a request to D2, results in ddns updates being -// suspended. This indicates that Dhcp4Srv's error handler has been invoked as expected. -// Note that this unit test relies on an attempt to send to a server address of 0.0.0.0 -// port 0 fails under all OSs. +// Checks that an IO error in sending a request to D2, results in ddns updates +// being suspended. This indicates that Dhcp4Srv's error handler has been +// invoked as expected. Note that this unit test relies on an attempt to send +// to a server address of 0.0.0.0 port 0 fails, which it does under all OSs +// except Solaris 11. +/// @todo Eventually we should find a way to test this under Solaris. +#ifndef OS_SOLARIS TEST_F(Dhcp4SrvD2Test, forceUDPSendFailure) { +#else +TEST_F(Dhcp4SrvD2Test, DISABLED_forceUDPSendFailure) { +#endif // Grab the manager and verify that be default ddns is off // and a sender was not started. dhcp::D2ClientMgr& mgr = CfgMgr::instance().getD2ClientMgr(); diff --git a/src/bin/dhcp6/tests/d2_unittest.cc b/src/bin/dhcp6/tests/d2_unittest.cc index 1f92c480dd..469aa43742 100644 --- a/src/bin/dhcp6/tests/d2_unittest.cc +++ b/src/bin/dhcp6/tests/d2_unittest.cc @@ -294,8 +294,14 @@ TEST_F(Dhcp6SrvD2Test, simpleUDPSend) { // Checks that an IO error in sending a request to D2, results in ddns updates // being suspended. This indicates that Dhcp6Srv's error handler has been // invoked as expected. Note that this unit test relies on an attempt to send -// to a server address of 0.0.0.0 port 0 fails under all OSs. +// to a server address of 0.0.0.0 port 0 fails, which it does under all OSs +// except Solaris 11. +/// @todo Eventually we should find a way to test this under Solaris. +#ifndef OS_SOLARIS TEST_F(Dhcp6SrvD2Test, forceUDPSendFailure) { +#else +TEST_F(Dhcp6SrvD2Test, DISABLED_forceUDPSendFailure) { +#endif // Grab the manager and verify that be default ddns is off // and a sender was not started. dhcp::D2ClientMgr& mgr = CfgMgr::instance().getD2ClientMgr();