Closed killenb closed 5 years ago
I removed the urgent flag because I found a workaround:
Create a variable in the CS and that is just connected back to the CS in deviceConnections()
// A dummy variable which is just connected back to the CS. Workaround for bug ApplicationCore #66: Main loops don't start
// with runApplication() but only in the first stepApplication(). Write to "writeMe" and then run TestFacility::stepApplication
// and all main loop will have started.
cs("writeMe",typeid(int),1) >> cs("readMe");
Then in the test write to it and perform a first stepApplication()
SumLimiterTestApp theTestApp;
ChimeraTK::TestFacility testFacility;
// we want to test that the initial values are processed in the beginning of the main loop,
// without any interaction with the module
testFacility.writeScalar<double>("/VoltageLimiter/acVoltageSetpoint",25.);
testFacility.writeScalar<double>("/VoltageLimiter/dcVoltageSetpoint",10.);
testFacility.runApplication();
// workaround for bug in test facility: Write to some bogous variable which has nothing to do with the app,
// so we can execute the first stepApplication which will start all main loops.
testFacility.writeScalar<int>("writeMe",42);
testFacility.stepApplication();
The TestFacility does not start the main loops of the modules in all cases in runApplication(). The main loop is eventually started in the first stepApplication(). I created a test which reproduces this isse (testTestFacility2.cc). Under Ubuntu16.04 it works if I add a Device which connected to the CS, triggered by a PeriodicTrigger. However, this fails under Ubuntu 18.04
I think it's an issue in the testable mode, that it returns the lock too early to the test facility.