Michael Wagner [
http://community.jboss.org/people/michael.wagner] created the discussion
"Re: jBPM JUnit tests are failing"
To view the discussion, visit:
http://community.jboss.org/message/616392#616392
--------------------------------------------------------------
Just getting more confused. If I increase the "sleep", the "list"
increases, too:
public void testTimerStart() throws Exception {
KnowledgeBase kbase = createKnowledgeBase("BPMN2-TimerStart.bpmn2");
StatefulKnowledgeSession ksession = createKnowledgeSession(kbase);
final List list = new ArrayList();
ksession.addEventListener(new DefaultProcessEventListener() {
public void afterProcessStarted(ProcessStartedEvent event) {
list.add(event.getProcessInstance().getId());
}
});
Thread.sleep(250);
assertEquals(0, list.size());
for (int i = 0; i < 5; i++) {
ksession.fireAllRules();
Thread.sleep(500);
}
// the longer the time is the more process instances are in "list"
Thread.sleep(3500);
assertEquals(5, list.size());
}
junit.framework.AssertionFailedError: expected:<5> but was:<9>
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/616392#616392]
Start a new discussion in jBPM Development at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]