[jbehave-dev] [jira] (JBEHAVE-1046) FailingUponPendingSteps strategy not honoured
Title: Message Title Mauro Talevi resolved an issue as Fixed Added examples/core/src/main/java/org/jbehave/examples/core/CoreStoriesFailingUponPending.java to verify behaviour. JBehave / JBEHAVE-1046 FailingUponPendingSteps strategy not honoured Change By: Mauro Talevi Resolution: Fixed Assignee: Mauro Talevi Status: Open Resolved Add Comment This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c) - To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
[jbehave-scm] [scm-core/jbehave-4.x][1/1] JBEHAVE-1046: Added stories configuration to verify failing behaviour upon pending steps.
commit 0de5aa2ec14cf17b225b39e4a575a677c100cb44 Author: Mauro Talevi AuthorDate: Sun, 5 Oct 2014 00:06:56 +0200 Commit: Mauro Talevi CommitDate: Sun, 5 Oct 2014 00:07:53 +0200 JBEHAVE-1046: Added stories configuration to verify failing behaviour upon pending steps. diff --git a/examples/core/src/main/java/org/jbehave/examples/core/CoreStoriesFailingUponPending.java b/examples/core/src/main/java/org/jbehave/examples/core/CoreStoriesFailingUponPending.java new file mode 100644 index 000..b31737c --- /dev/null +++ b/examples/core/src/main/java/org/jbehave/examples/core/CoreStoriesFailingUponPending.java @@ -0,0 +1,26 @@ +package org.jbehave.examples.core; + +import static org.jbehave.core.io.CodeLocations.codeLocationFromClass; + +import java.util.List; + +import org.jbehave.core.configuration.Configuration; +import org.jbehave.core.failures.FailingUponPendingStep; +import org.jbehave.core.io.StoryFinder; + +/** + */ +public class CoreStoriesFailingUponPending extends CoreStories { + + public Configuration configuration() { + return super.configuration() + .usePendingStepStrategy(new FailingUponPendingStep()); + } + +@Override +protected List storyPaths() { +String filter = System.getProperty("story.filter", "**/pending.story"); +return new StoryFinder().findPaths(codeLocationFromClass(this.getClass()), filter, ""); +} + +} \ No newline at end of file
[jbehave-scm] [scm-core][1/1] JBEHAVE-1046: Added stories configuration to verify failing behaviour upon pending steps.
commit 3a84a8f8a59973ccf70796278a7ff1d6d2504069 Author: Mauro Talevi AuthorDate: Sun, 5 Oct 2014 00:06:56 +0200 Commit: Mauro Talevi CommitDate: Sun, 5 Oct 2014 00:06:56 +0200 JBEHAVE-1046: Added stories configuration to verify failing behaviour upon pending steps. diff --git a/examples/core/src/main/java/org/jbehave/examples/core/CoreStoriesFailingUponPending.java b/examples/core/src/main/java/org/jbehave/examples/core/CoreStoriesFailingUponPending.java new file mode 100644 index 000..b31737c --- /dev/null +++ b/examples/core/src/main/java/org/jbehave/examples/core/CoreStoriesFailingUponPending.java @@ -0,0 +1,26 @@ +package org.jbehave.examples.core; + +import static org.jbehave.core.io.CodeLocations.codeLocationFromClass; + +import java.util.List; + +import org.jbehave.core.configuration.Configuration; +import org.jbehave.core.failures.FailingUponPendingStep; +import org.jbehave.core.io.StoryFinder; + +/** + */ +public class CoreStoriesFailingUponPending extends CoreStories { + + public Configuration configuration() { + return super.configuration() + .usePendingStepStrategy(new FailingUponPendingStep()); + } + +@Override +protected List storyPaths() { +String filter = System.getProperty("story.filter", "**/pending.story"); +return new StoryFinder().findPaths(codeLocationFromClass(this.getClass()), filter, ""); +} + +} \ No newline at end of file
[jbehave-dev] [jira] (JBEHAVE-1051) The method StoryManager.waitUntilAllDoneOrFailed(BatchFailures) can cancel un-started stories
Title: Message Title Mauro Talevi resolved an issue as Duplicate Duplicate of JBEHAVE-1046. JBehave / JBEHAVE-1051 The method StoryManager.waitUntilAllDoneOrFailed(BatchFailures) can cancel un-started stories Change By: Mauro Talevi Resolution: Duplicate Fix Version/s: 3.9.5 Status: Open Resolved Add Comment This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c) - To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
[jbehave-scm] [scm-core/jbehave-4.x][1/1] JBEHAVE-1046: Wait for running stories to start, if any are present.
commit 052d3379cab442789e2f9f60cdf44a766a18c969 Author: Mauro Talevi AuthorDate: Sat, 4 Oct 2014 19:18:20 +0100 Commit: Mauro Talevi CommitDate: Sat, 4 Oct 2014 23:27:07 +0200 JBEHAVE-1046: Wait for running stories to start, if any are present. Conflicts: jbehave-core/src/main/java/org/jbehave/core/embedder/StoryManager.java diff --git a/jbehave-core/src/main/java/org/jbehave/core/embedder/StoryManager.java b/jbehave-core/src/main/java/org/jbehave/core/embedder/StoryManager.java index dcf4f6e..da944c6 100644 --- a/jbehave-core/src/main/java/org/jbehave/core/embedder/StoryManager.java +++ b/jbehave-core/src/main/java/org/jbehave/core/embedder/StoryManager.java @@ -157,11 +157,16 @@ public class StoryManager { } public void waitUntilAllDoneOrFailed(RunContext context) { +if ( runningStories.values().isEmpty() ) { + return; +} boolean allDone = false; -while (!allDone) { +boolean started = false; +while (!allDone || !started) { allDone = true; for (RunningStory runningStory : runningStories.values()) { if ( runningStory.isStarted() ){ + started = true; Story story = runningStory.getStory(); Future future = runningStory.getFuture(); if (!future.isDone()) { @@ -195,6 +200,8 @@ public class StoryManager { } } } +} else { + started = false; } } tickTock();
[jbehave-scm] [scm-core][1/1] JBEHAVE-1046: Wait for running stories to start, if any are present.
commit f9f27c82a41c0483b29f3d2b7bafaff7d7cb8042 Author: Mauro Talevi AuthorDate: Sat, 4 Oct 2014 19:18:20 +0100 Commit: Mauro Talevi CommitDate: Sat, 4 Oct 2014 19:18:20 +0100 JBEHAVE-1046: Wait for running stories to start, if any are present. diff --git a/jbehave-core/src/main/java/org/jbehave/core/embedder/StoryManager.java b/jbehave-core/src/main/java/org/jbehave/core/embedder/StoryManager.java index 2414cf7..123084a 100644 --- a/jbehave-core/src/main/java/org/jbehave/core/embedder/StoryManager.java +++ b/jbehave-core/src/main/java/org/jbehave/core/embedder/StoryManager.java @@ -139,11 +139,16 @@ public class StoryManager { } public void waitUntilAllDoneOrFailed(BatchFailures failures) { +if ( runningStories.values().isEmpty() ) { + return; +} boolean allDone = false; -while (!allDone) { +boolean started = false; +while (!allDone || !started) { allDone = true; for (RunningStory runningStory : runningStories.values()) { if ( runningStory.isStarted() ){ + started = true; Story story = runningStory.getStory(); Future future = runningStory.getFuture(); if (!future.isDone()) { @@ -177,6 +182,8 @@ public class StoryManager { } } } +} else { + started = false; } } tickTock();