Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: end html formatter stream at appropriate time #2233

Merged
merged 4 commits into from Feb 11, 2023

Conversation

davidjgoss
Copy link
Contributor

@davidjgoss davidjgoss commented Feb 10, 2023

πŸ€” What's changed?

In the html formatter, change when we end the CucumberHtmlStream that pipes to the output stream.

Previously we did this when we saw a testRunFinished message, which sort of makes sense. However there are other ways for a test run to end e.g. Gherkin parse failure as in the linked issue. This meant we were awaiting a stream to finish that was never going to, and this caused the process to just exit (I'm a little hazy as to exactly why, but I could reproduce it).

Now we only end the stream in the cleanup step after the test run has finished (or an error has caused us to bail out of it) and it works for both cases - covered by existing scenarios for the happy path and a new one covering the parse failure.

⚑️ What's your motivation?

Fixes #2225.

🏷️ What kind of change is this?

  • πŸ› Bug fix (non-breaking change which fixes a defect)

πŸ“‹ Checklist:

  • I agree to respect and uphold the Cucumber Community Code of Conduct
  • I've changed the behaviour of the code
    • I have added/updated tests to cover my changes.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
  • Users should know about my change
    • I have added an entry to the "Unreleased" section of the CHANGELOG, linking to this pull request.

This text was originally generated from a template, then edited by hand. You can modify the template here.

@davidjgoss davidjgoss changed the title fix: fix: end html formatter stream at appropriate time Feb 10, 2023
@coveralls
Copy link

coveralls commented Feb 10, 2023

Coverage Status

Coverage: 98.563% (-0.002%) from 98.564% when pulling 41eec86 on fix/html-formatter-parse-failure into 6f3385c on main.

@davidjgoss davidjgoss marked this pull request as ready for review February 10, 2023 18:31
@davidjgoss davidjgoss merged commit ca4118d into main Feb 11, 2023
@davidjgoss davidjgoss deleted the fix/html-formatter-parse-failure branch February 11, 2023 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

false negative return for broken feature file
2 participants