]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[master] Corrected dhcp_ddns::WatchSocket unit test failure
authorThomas Markwalder <tmark@isc.org>
Tue, 11 Feb 2014 18:40:57 +0000 (13:40 -0500)
committerThomas Markwalder <tmark@isc.org>
Tue, 11 Feb 2014 18:40:57 +0000 (13:40 -0500)
Unit test was failing as a closed fd passed to select() does not fail
on all OSs.  Changed the test so it verifies that the fd in question
no longer evaluates to ready to ready.

src/lib/dhcp_ddns/tests/watch_socket_unittests.cc

index 82999f6b8c920ee723af84b1f11e7bce9d20a695..e19b8cbe21c7401f760941bc3b743be167438e9c 100644 (file)
@@ -194,8 +194,8 @@ TEST(WatchSocketTest, badReadOnClear) {
     /// @todo maybe clear should never throw, log only
     ASSERT_THROW(watch->clearReady(), WatchSocketError);
 
-    // Verify the select_fd fails as socket is invalid/closed.
-    EXPECT_EQ(-1, selectCheck(select_fd));
+    // Verify the select_fd does not evalute to ready.
+    EXPECT_NE(1, selectCheck(select_fd));
 
     // Verify that getSelectFd() returns INVALID.
     ASSERT_EQ(WatchSocket::INVALID_SOCKET, watch->getSelectFd());