Skip to content
Snippets Groups Projects
Commit 79127c2c authored by Martin Christoph Hierholzer's avatar Martin Christoph Hierholzer
Browse files

fix not synchronising test logic to start of mainLoop()

this was violating thread safety of accessors, since the mainLoopWrapper() was reading initial values at the same time as the test thread was reading the same accessors.
parent bd235e33
No related branches found
No related tags found
No related merge requests found
......@@ -197,6 +197,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(testTriggerDevToCS, T, test_types) {
app.initialise();
app.run();
app.testModule.mainLoopStarted.wait(); // make sure the module's mainLoop() is entered
auto myCSVar = pvManagers.first->getProcessArray<T>("/myCSVar");
......@@ -248,6 +249,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(testTriggerByCS, T, test_types) {
app.initialise();
app.run();
app.testModule.mainLoopStarted.wait(); // make sure the module's mainLoop() is entered
auto myCSVar = pvManagers.first->getProcessArray<T>("/myCSVar");
auto theTrigger = pvManagers.first->getProcessArray<T>("/theTrigger");
......@@ -307,6 +309,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(testTriggerTransferGroup, T, test_types) {
app.dev2("/REG3")[app.testModule.theTrigger] >> app.testModule.consumingPush3;
app.initialise();
app.run();
app.testModule.mainLoopStarted.wait(); // make sure the module's mainLoop() is entered
// initialise values
app.testModule.consumingPush = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment