]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#4101] Fixed UT correctly
authorThomas Markwalder <tmark@isc.org>
Wed, 10 Sep 2025 13:19:51 +0000 (09:19 -0400)
committerThomas Markwalder <tmark@isc.org>
Wed, 10 Sep 2025 13:30:20 +0000 (13:30 +0000)
Also included unrelated doc fix

modified:   doc/devel/unit-tests.dox
modified:   src/lib/asiolink/tests/io_service_unittest.cc

doc/devel/unit-tests.dox
src/lib/asiolink/tests/io_service_unittest.cc

index c02a6c32d6d2cc42cc946212c67a5b2583d983fe..bf9001b0f8319bb363f503f5de010c854ef4b5a5 100644 (file)
@@ -129,7 +129,7 @@ anything e.g. `DEBUG=true`. `unset DEBUG` to remove this behavior.
 
 @section unitTestsDatabaseConfig Databases Configuration for Unit Tests
 
-  With the use of databases requiring separate authorisation, there are
+  With the use of databases requiring separate authorization, there are
   certain database-specific pre-requisites for successfully running the unit
   tests.  These are listed in the following sections.
 
index 8f52d3f54ff35066280fdd95289390fb8cbd86d9..f760d35019c8ff536792d47c5f45f0cac0277de1 100644 (file)
@@ -99,9 +99,6 @@ TEST(IOService, runOneForStopped) {
     // Sleep for 5 ms.
     usleep(5 * 1000);
 
-    // Cancel the timer.
-    timer.cancel();
-
     // Stop the service.
     io_service->stop();
 
@@ -113,6 +110,12 @@ TEST(IOService, runOneForStopped) {
     EXPECT_EQ(0, cnt);
     EXPECT_FALSE(timed_out);
     EXPECT_FALSE(timer_fired);
+
+    // Cancel the timer.
+    timer.cancel();
+
+    io_service->restart();
+    io_service->poll();
 }
 
 }