diff --git a/spring-statemachine-recipes/src/test/java/org/springframework/statemachine/recipes/TasksHandlerTests.java b/spring-statemachine-recipes/src/test/java/org/springframework/statemachine/recipes/TasksHandlerTests.java index c0228682..e1030702 100644 --- a/spring-statemachine-recipes/src/test/java/org/springframework/statemachine/recipes/TasksHandlerTests.java +++ b/spring-statemachine-recipes/src/test/java/org/springframework/statemachine/recipes/TasksHandlerTests.java @@ -25,6 +25,8 @@ import java.util.Map; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.junit.Test; import org.springframework.statemachine.StateContext; import org.springframework.statemachine.StateMachine; @@ -38,6 +40,8 @@ import org.springframework.statemachine.transition.Transition; public class TasksHandlerTests { + private final static Log log = LogFactory.getLog(TasksHandlerTests.class); + @Test public void testRunOnceSimpleNoFailures() throws InterruptedException { TasksHandler handler = TasksHandler.builder() @@ -434,6 +438,7 @@ public class TasksHandlerTests { @Test public void testReset3() throws InterruptedException { + log.info("testReset3 start"); List> childs = new ArrayList>(); DefaultStateMachineContext context = new DefaultStateMachineContext(childs, "ERROR", null, null, null); TestStateMachinePersist persist = new TestStateMachinePersist(context); @@ -451,8 +456,10 @@ public class TasksHandlerTests { handler.resetFromPersistStore(); + log.info("testReset3 wait stateMachineStartedLatch"); assertThat(listener.stateMachineStartedLatch.await(1, TimeUnit.SECONDS), is(true)); + log.info("testReset3 wait stateChangedLatch"); assertThat(listener.stateChangedLatch.await(4, TimeUnit.SECONDS), is(true)); assertThat(listener.stateChangedCount, is(2)); assertThat(machine.getState().getIds(), contains(TasksHandler.STATE_READY)); @@ -536,6 +543,7 @@ public class TasksHandlerTests { @Override public void stateChanged(State from, State to) { synchronized (lock) { + TasksHandlerTests.log.info("stateChanged " + from + "::" + to); stateChangedCount++; stateChangedLatch.countDown(); }