Browse Source

[trac678] fix the bug that alarm isn't cancelled which will blocking followed unit test

hanfeng 14 years ago
parent
commit
e909ff9900
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/lib/asiolink/tests/dns_server_unittest.cc

+ 2 - 0
src/lib/asiolink/tests/dns_server_unittest.cc

@@ -354,6 +354,8 @@ class DNSServerTest : public::testing::Test {
             alarm(io_service_time_out);
             service.run();
             service.reset();
+            //cancel scheduled alarm
+            alarm(0);
             std::signal(SIGALRM, prev_handler);
         }