Browse Source

[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
Thomas Markwalder 11 years ago
parent
commit
b8ce9d2676
2 changed files with 17 additions and 5 deletions
  1. 10 4
      src/bin/dhcp4/tests/d2_unittest.cc
  2. 7 1
      src/bin/dhcp6/tests/d2_unittest.cc

+ 10 - 4
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();

+ 7 - 1
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();