Issues

Select view

Select search mode

 
1 of 1

AfterStory/AfterScenario is not executed after scenario failure by timeout

Fixed

Description

I'm still facing this issue https://jbehave.atlassian.net/browse/JBEHAVE-1385 when a timeout is reached I get the following error. Also the following scenarios are not executed due to this exception.

STORY CANCELLED (DURATION 4 s) Failed to run story Test/j_behave5_test.story org.jbehave.core.failures.UUIDExceptionWrapper: java.lang.InterruptedException: Test/j_behave5_test.story at org.jbehave.core.embedder.PerformableTree.perform(PerformableTree.java:492) at org.jbehave.core.embedder.StoryManager$EnqueuedStory.call(StoryManager.java:296) at org.jbehave.core.embedder.StoryManager$EnqueuedStory.call(StoryManager.java:269) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: java.lang.InterruptedException: Test/j_behave5_test.story at org.jbehave.core.embedder.PerformableTree$RunContext.interruptIfCancelled(PerformableTree.java:616) at org.jbehave.core.embedder.PerformableTree$PerformableSteps.perform(PerformableTree.java:1422) at org.jbehave.core.embedder.PerformableTree$AbstractPerformableScenario.perform(PerformableTree.java:1274) at org.jbehave.core.embedder.PerformableTree$AbstractPerformableScenario.performRestartableSteps(PerformableTree.java:1254) at org.jbehave.core.embedder.PerformableTree$AbstractPerformableScenario.performScenario(PerformableTree.java:1266) at org.jbehave.core.embedder.PerformableTree$NormalPerformableScenario.perform(PerformableTree.java:1314) at org.jbehave.core.embedder.PerformableTree$PerformableScenario.perform(PerformableTree.java:1200) at org.jbehave.core.embedder.PerformableTree$PerformableStory.performScenarios(PerformableTree.java:1089) at org.jbehave.core.embedder.PerformableTree$PerformableStory.perform(PerformableTree.java:1064) at org.jbehave.core.embedder.PerformableTree.performCancellable(PerformableTree.java:514) at org.jbehave.core.embedder.PerformableTree.perform(PerformableTree.java:481) ... 6 more AfterStories Failed to run batch Test/j_behave5_test.story@3f6b0be5: java.util.concurrent.CancellationException Generating reports view to '/JBheave5Test/target/jbehave' using formats '[stats, console, txt, html]' and view properties '{reports=ftl/jbehave-reports.ftl, nonDecorated=ftl/jbehave-report-non-decorated.ftl, maps=ftl/jbehave-maps.ftl, views=ftl/jbehave-views.ftl, decorated=ftl/jbehave-report-decorated.ftl}' Reports view generated with 2 stories (of which 0 pending) containing 2 scenarios (of which 0 pending) Failures in reports view: 1 scenarios failed Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.924 sec Results : Tests run: 1, Failures: 0, Errors: 0, Skipped: 0

Here is an example project, you can test it by running `mvn clean test`

I think this issue also relates to https://jbehave.atlassian.net/browse/JBEHAVE-1064

Details

Assignee

Reporter

Components

Fix versions

Priority

Created September 22, 2022 at 10:32 PM
Updated October 7, 2022 at 7:43 AM
Resolved October 7, 2022 at 7:42 AM

Activity

Show:

Valery YatsynovichOctober 7, 2022 at 7:42 AM

The PR is merged.

Valery YatsynovichOctober 6, 2022 at 8:40 PM

It is also worth adding that only 2 out of 3 scenarios reported therefore missing the last one.

could you please file a separate issue for the reporting? or add details to https://jbehave.atlassian.net/browse/JBEHAVE-1064 if you have any?

Valery YatsynovichOctober 6, 2022 at 8:35 PM

Boris VidalSeptember 22, 2022 at 11:11 PM

It is also worth adding that only 2 out of 3 scenarios reported therefore missing the last one.