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

SpecDatastore is not reset when multiple specs are executed on the same runner #2270

Open
F7502 opened this issue Aug 4, 2022 · 2 comments

Comments

@F7502
Copy link

F7502 commented Aug 4, 2022

Describe the bug
We are running multiple test specs (using the gauge-ts runner) in parallel and we have more test specs than runners. In this setup some test specs are executed on the same runner sequentially. We observed that the Specification DataStore is not properly reset between such sequential test spec executions although the documentation clearly states:
Values are cleared after every specification is executed.

I digged a bit into the code and found this here:

if executeBefore {

If executeBefore is false, the spec data store will not be reset before the spec is executed. However, when multiple specs are run on the same runner, executeBefore is only true for the first spec:
loop over all specs:

for i, spec := range specs {

setting to false after first spec:
before = false

Expected behavior
The specification data store should be reset before every test spec execution.

Versions:
"@getgauge/cli": "1.4.3"

@zabil
Copy link
Member

zabil commented Aug 11, 2022

Thanks for pointing out the issue. Do you want to send a pull request to fix this issue as you've already figured the spot?

@sriv
Copy link
Member

sriv commented Oct 31, 2022

@barnesjohnraymond has opened #2299 to address this, but I worry that the proposed change will break table driven execution.

I am going to try and replicate this issue, @F7502 / @@barnesjohnraymond - do you have a sample project that can help me replicate this? If not, I'll try to create something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants