mitchellwrosen / tasty-hspec

Hspec provider for tasty
Other
15 stars 10 forks source link

hspec tests run in parallel #34

Open nalkuatov opened 4 months ago

nalkuatov commented 4 months ago

It looks like SpecTrees, when converted to TestTrees, run in parallel. AFAIK there's nothing we can do about that, but sometimes it is surprising -- we might expect that the tests under hspec's Spec run sequentially. Is this a known issue?

mitchellwrosen commented 4 months ago

It is not known (by me), though I don't keep many things in my head at once :)

Can you point to where in the implementation you see that, and comment on why it seems there's nothing we can do about it?

nalkuatov commented 4 months ago

Can you point to where in the implementation you see that

There is itemIsParallelizable (set to Nothing by default unless a testcase is explicitly marked parallel) which is not taken into account at specTreeToTestTree.

why it seems there's nothing we can do about it?

Parallel test execution is one of the tasty's main features -- the only way to achieve a sequential run is by making dependencies.

I'll investigate this more, hoping there is something to do.

mitchellwrosen commented 4 months ago

I see - so if I understand correctly, hspec defaults to sequential, and tasty defaults to parallel, and this conversion package doesn't even inspect or respect the "is parallel" bit, so it can change the semantics of your test suite. Is that right?

nalkuatov commented 4 months ago

Yup, absolutely