1 17 package org.apache.servicemix.beanflow; 18 19 import org.apache.servicemix.beanflow.Activity.Transitions; 20 import org.apache.servicemix.beanflow.util.ActivityTestSupport; 21 22 26 public class TimeoutFlowTest extends ActivityTestSupport { 27 protected TimeoutActivity flow = new TimeoutActivity(); 28 29 public void testFlowStopsSuccessfully() throws Exception { 30 flow.getState().set(Transitions.Stopped); 31 assertStopped(flow); 32 33 Thread.sleep(timeout * 4); 36 assertStopped(flow); 37 } 38 39 public void testFlowTimesOutAndFails() throws Exception { 40 Thread.sleep(timeout * 4); 41 assertFailed(flow); 42 } 43 44 protected void setUp() throws Exception { 45 startActivity(flow, timeout); 46 } 47 } 48 | Popular Tags |