Unstable synchronization causes to fail some unit tests.
Change-Id: I02dd6fd35b5f4ef6a367c14da05944baf1802bc4
manager = managerConstructor.newInstance(args, process);
// synchronization barrier
- while (!reached){}
+ while (!reached) {
+ Thread.sleep(100);
+ }
// actually manager should already recognize that process stopped
// because process state should be monitored asynchronously due to the specification
manager = managerConstructor.newInstance(args, process);
// synchronization barrier
- while (!reached) {}
+ while (!reached) {
+ Thread.sleep(100);
+ }
// actually manager should already recognize that process stopped
assertTrue(manager.isFinished());