Make starter_test reliable
We were setting a success bool in another thread, but weren't
synchronizing with that thread. Join the thread before reading the
success variable to synchronize that variable.
This makes starter_test go from 1-2% failure to 0% failure on my
machine.
Change-Id: I1a54d2fded7800e4ca1576accbfab06bcfb36679
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/aos/starter/starter_test.cc b/aos/starter/starter_test.cc
index 79880f7..94566ae 100644
--- a/aos/starter/starter_test.cc
+++ b/aos/starter/starter_test.cc
@@ -176,9 +176,9 @@
client_started.Wait();
watcher_loop.Run();
- ASSERT_TRUE(success);
test_done_ = true;
client_thread.join();
+ ASSERT_TRUE(success);
starterd_thread.join();
}