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: null exception when using parallel batches/forks #9

Merged

Conversation

ccharnkij
Copy link
Contributor

Description

This is a fix for #5. It seems like the main issue is using TestSourcesModel to obtain Features in CucumberScenarioLoader and ScenarioLineCountStatistics. From what I can see, TestSourcesModel can only be used to get Features if it has TestSourceRead event in its field already. In CucumberScenarioLoader and ScenarioLineCountStatistics prior to this fix, the fields in TestSourcesModal are all empty. For this fix, I only changed the way Features are obtained.

Aside from that, there was a line that collects to map that did nothing. I removed it. mapsForFeatures wasn't set, so I set that too.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

I added more tests in build.gradle. Not sure why those 2 lines aren't already there. I also installed locally and did e2e tests using both LineCount and MultiRunTest.

Extra Note:

I notice that the documentation in serenity-bdd.github.io, specifically the section of how to configure failsafe plugin, does not mention the config reuseForks=false. Without it, I had many cases where all test splits go to one fork. When I have that config in, all forks get their shares.

@wakaleo wakaleo merged commit 6be8b74 into serenity-bdd:master May 13, 2020
@wakaleo
Copy link
Member

wakaleo commented May 13, 2020

Should be available in serenity-cucumber5 version 2.2.5

@ccharnkij ccharnkij deleted the fix_null_on_load_cucumberscenarioloader branch May 20, 2020 07:39
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.

2 participants