The method StoryManager.waitUntilAllDoneOrFailed(BatchFailures) can cancel un-started stories
Description
I run several stories in parallel using the default multi-threaded Embedder.executorService and configure it with EmbedderControls.threads > 1 Sometimes the JBEHAVE ends and no scenario (but before- and after- scenario) of my stories was even started. It is not repeatable, sometims it goes good. I founded out, that the method StoryManager.waitUntilAllDoneOrFailed fails, if there are ONLY stories, which are already SUBMITTED, but not yet really STARTED. The method StoryManager.waitUntilAllDoneOrFailed doesn't consider them while is defining, whether all stories are done or not. However waitUntilAllDoneOrFailed cancells them later.
The success or failure of stories depend therefore on the race condition of starting the stories and waitUntilAllDoneOrFailed.
I run several stories in parallel using the default multi-threaded Embedder.executorService and configure it with EmbedderControls.threads > 1
Sometimes the JBEHAVE ends and no scenario (but before- and after- scenario) of my stories was even started. It is not repeatable, sometims it goes good.
I founded out, that the method StoryManager.waitUntilAllDoneOrFailed fails, if there are ONLY stories, which are already SUBMITTED, but not yet really STARTED. The method StoryManager.waitUntilAllDoneOrFailed doesn't consider them while is defining, whether all stories are done or not. However waitUntilAllDoneOrFailed cancells them later.
The success or failure of stories depend therefore on the race condition of starting the stories and waitUntilAllDoneOrFailed.