JBehave
  1. JBehave
  2. JBEHAVE-520

StoryRunner failure strategy is not set when running before or after stories steps in multiple threads

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 3.4
    • Fix Version/s: 3.4.1, 3.5
    • Component/s: Core
    • Labels:
      None
    • Environment:
      Windowx XP, mvn 3.0.3 and 2.2.1, jbehave 3.4
    • Testcase included:
      yes
    • Number of attachments :
      1

      Description

      I got following exception when building attached project (mvn clean install):

      -------------------------------------------------------------------------------
      Test set: pl.mmadej.jbehave.JBehaveStoriesTest
      -------------------------------------------------------------------------------
      Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.562 sec <<< FAILURE!
      [run_with_no_replacement.story](pl.mmadej.jbehave.JBehaveStoriesTest) Time elapsed: 0.343 sec <<< ERROR!
      org.jbehave.core.embedder.Embedder$RunningStoriesFailed: Failures in running before or after stories steps
      at org.jbehave.core.embedder.Embedder.runStoriesAsPaths(Embedder.java:210)
      at pl.mmadej.jbehave.JBehaveStoriesTest.run(JBehaveStoriesTest.java:99)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      Please investigate. This error happens with jbehave 3.4. When I'm using 3.3.2 everything looks ok.
      Internally there is NPE in StoryRunner:76 – currentStrategy.get().handleFailure(storyFailure.get());
      currentStrategy.get() returns null.

      Please investigate.
      Thanks in advance for your help

        Activity

        Hide
        Mauro Talevi added a comment -

        Only occurs if you use multiple threads.

        Need to investigate why, but for nos stick to 1 thread.

        Show
        Mauro Talevi added a comment - Only occurs if you use multiple threads. Need to investigate why, but for nos stick to 1 thread.
        Hide
        Maciej Madej added a comment -

        Yes, works for one thread, thx for fast reply

        Show
        Maciej Madej added a comment - Yes, works for one thread, thx for fast reply
        Mauro Talevi made changes -
        Field Original Value New Value
        Summary NPE in StoryRunner:76 [currentStrategy.get().handleFailure(storyFailure.get());] - causing org.jbehave.core.embedder.Embedder$RunningStoriesFailed: Failures in running before or after stories steps NPE in StoryRunner: currentStrategy is not set when running before or after stories steps
        Fix Version/s 3.4.1 [ 17387 ]
        Fix Version/s 3.4 [ 17278 ]
        Mauro Talevi made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Mauro Talevi made changes -
        Summary NPE in StoryRunner: currentStrategy is not set when running before or after stories steps StoryRunner failure strategy is not set when running before or after stories steps in multiple threads
        Mauro Talevi made changes -
        Fix Version/s 3.5 [ 17393 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Maciej Madej
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: