Fix potential concurrency issue with join pseudostate
- Change notified flag to volatile which might explain some test failures. - More testing tweaks for #76
This commit is contained in:
@@ -63,7 +63,7 @@ public class TasksTests {
|
||||
public void testRunOnce() throws InterruptedException {
|
||||
listener.reset(9, 0, 0);
|
||||
tasks.run();
|
||||
assertThat(listener.stateChangedLatch.await(6, TimeUnit.SECONDS), is(true));
|
||||
assertThat(listener.stateChangedLatch.await(8, TimeUnit.SECONDS), is(true));
|
||||
assertThat(machine.getState().getIds(), contains(States.READY));
|
||||
Map<Object, Object> variables = machine.getExtendedState().getVariables();
|
||||
assertThat(variables.size(), is(3));
|
||||
@@ -73,7 +73,7 @@ public class TasksTests {
|
||||
public void testRunTwice() throws InterruptedException {
|
||||
listener.reset(9, 0, 0);
|
||||
tasks.run();
|
||||
assertThat(listener.stateChangedLatch.await(6, TimeUnit.SECONDS), is(true));
|
||||
assertThat(listener.stateChangedLatch.await(8, TimeUnit.SECONDS), is(true));
|
||||
assertThat(machine.getState().getIds(), contains(States.READY));
|
||||
|
||||
Map<Object, Object> variables = machine.getExtendedState().getVariables();
|
||||
@@ -81,7 +81,7 @@ public class TasksTests {
|
||||
|
||||
listener.reset(9, 0, 0);
|
||||
tasks.run();
|
||||
assertThat(listener.stateChangedLatch.await(6, TimeUnit.SECONDS), is(true));
|
||||
assertThat(listener.stateChangedLatch.await(8, TimeUnit.SECONDS), is(true));
|
||||
assertThat(machine.getState().getIds(), contains(States.READY));
|
||||
|
||||
variables = machine.getExtendedState().getVariables();
|
||||
|
||||
Reference in New Issue
Block a user