Parcourir la source

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

hanfeng il y a 14 ans
Parent
commit
e909ff9900
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  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);
         }