JBehave
  1. JBehave
  2. JBEHAVE-585

BeforeStories.xml can be zero length ( causing xUnit to fail a Jenkins job )

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Minor Minor
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: 3.7.5, 3.8
    • Component/s: Core
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Never fear, the following can fix it so that the Jenkins job can complete:

      find $WORKSPACE/project/target/jbehave -maxdepth 1 -type f -size 0 -exec rm -f {} \;

        Activity

        Hide
        Mauro Talevi added a comment -

        So what is the proposed fix from JBehave's pov (i.e. not Jenkins')?

        Show
        Mauro Talevi added a comment - So what is the proposed fix from JBehave's pov (i.e. not Jenkins')?
        Mauro Talevi made changes -
        Field Original Value New Value
        Fix Version/s 3.x [ 16979 ]
        Fix Version/s 3.5 [ 17393 ]
        Hide
        Paul Brunckhorst added a comment -

        In my experience, zero length BeforeStories.xml is written out when Jbehave is run with multiple threads. The exact same build works fine when run with a single thread.

        This is a real pain as our builds are so long that we have to run with multiple threads, but if we do the xUnit reports are not generated.

        Show
        Paul Brunckhorst added a comment - In my experience, zero length BeforeStories.xml is written out when Jbehave is run with multiple threads. The exact same build works fine when run with a single thread. This is a real pain as our builds are so long that we have to run with multiple threads, but if we do the xUnit reports are not generated.
        Hide
        Paul Brunckhorst added a comment - - edited

        After some debugging, it looks like ConcurrentStoryReporter.invokeDelayed() is only called when the stage is AFTER. As a result, nothing is ever written out to the BeforeStories report files when run in multi-threaded mode.

        See StoryRunner.runBeforeOrAfterStories(Configuration configuration, List<CandidateSteps> candidateSteps, Stage stage)

        Note that I am using 3.6.8

        Show
        Paul Brunckhorst added a comment - - edited After some debugging, it looks like ConcurrentStoryReporter.invokeDelayed() is only called when the stage is AFTER . As a result, nothing is ever written out to the BeforeStories report files when run in multi-threaded mode. See StoryRunner.runBeforeOrAfterStories(Configuration configuration, List<CandidateSteps> candidateSteps, Stage stage) Note that I am using 3.6.8
        Hide
        Paul Brunckhorst added a comment -

        Looks like this has been fixed somewhere between 3.6.8 and 3.8-SNAPSHOT?

        Show
        Paul Brunckhorst added a comment - Looks like this has been fixed somewhere between 3.6.8 and 3.8-SNAPSHOT?
        Hide
        Paul Brunckhorst added a comment -

        Confirmed fixed in 3.7.4.

        Show
        Paul Brunckhorst added a comment - Confirmed fixed in 3.7.4.
        Hide
        Alexander Lehmann added a comment - - edited

        I have added some calls to close all files for JBEHAVE-848, that included a fix for BeforeStories in Story Runner for ConcurrentStoryReporter.

        the changes were released in 3.7.4

        Mauro can you please close the issue as fixed?

        Show
        Alexander Lehmann added a comment - - edited I have added some calls to close all files for JBEHAVE-848 , that included a fix for BeforeStories in Story Runner for ConcurrentStoryReporter. the changes were released in 3.7.4 Mauro can you please close the issue as fixed?
        Hide
        Mauro Talevi added a comment -

        Fixed in JBEHAVE-848.

        Show
        Mauro Talevi added a comment - Fixed in JBEHAVE-848 .
        Mauro Talevi made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 3.7.5 [ 18997 ]
        Fix Version/s 3.x [ 16979 ]
        Resolution Duplicate [ 3 ]
        Mauro Talevi made changes -
        Fix Version/s 3.8 [ 19104 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Paul Hammant
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: