xenomachina
09/07/2023, 5:22 PMIs it supposed to be possible forI'm asking because with 5.7.1 and 5.7.2 we're seeingto get called more than once on a singlebeforeSpec
?Spec
beforeSpec
getting called twice on a single spec, but only sometimes. (We weren't seeing this behavior with 5.6.2 or earlier.) How many times it gets run seems nondeterministic: on some machines it only calls it once, on others it'll call it twice. Other things can affect this too, like if all specs are being run, or only a subset, or even if the repo is clean or had previously run the tests.
Given the nondeterminism, it feels like a race condition: like something is not realizing that another coroutine already ran (or started to run) beforeSpec
, and so it runs it again.
The docs seem to imply that beforeSpec
is only supposed to be called once per spec instance, though I can't find a place where they say this explicitly.
So before I file a bug report about this, I'd like to confirm: is beforeSpec
supposed to only get called once per spec instance?Oliver.O
09/07/2023, 6:13 PMxenomachina
09/07/2023, 7:31 PM