unit-tests: Give worker threads time to clean up when testing thread_t.detach()
authorTobias Brunner <tobias@strongswan.org>
Wed, 25 Jun 2014 14:37:25 +0000 (16:37 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 9 Sep 2014 08:58:59 +0000 (10:58 +0200)
src/libstrongswan/tests/suites/test_threading.c

index 0526d9d..47e4484 100644 (file)
@@ -980,7 +980,8 @@ START_TEST(test_detach)
                sched_yield();
        }
        /* no checks done here, but we check that thread state gets cleaned
-        * up with leak detective. */
+        * up with leak detective. give the threads time to clean up. */
+       usleep(10000);
 }
 END_TEST
 
@@ -1015,7 +1016,8 @@ START_TEST(test_detach_exit)
                sched_yield();
        }
        /* no checks done here, but we check that thread state gets cleaned
-        * up with leak detective. */
+        * up with leak detective. give the threads time to clean up. */
+       usleep(10000);
 }
 END_TEST