Browse Source

[357] test for negative timeout config

Jelte Jansen 12 years ago
parent
commit
c1f4e35339
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/bin/auth/tests/config_unittest.cc

+ 3 - 0
src/bin/auth/tests/config_unittest.cc

@@ -151,6 +151,9 @@ TEST_F(AuthConfigTest, tcpRecvTimeoutConfig) {
     configureAuthServer(server, Element::fromJSON(
     "{ \"tcp_recv_timeout\": 2000 }"));
     EXPECT_EQ(2000, dnss_.getTCPRecvTimeout());
+    EXPECT_THROW(configureAuthServer(server, Element::fromJSON(
+                    "{ \"tcp_recv_timeout\": -123 }")),
+                 AuthConfigError);
 }
 
 }