-
Notifications
You must be signed in to change notification settings - Fork 104
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
hspec-core-2.4.4 test suite fails "Test.Hspec.Core.Runner.hspecResult runs specs in parallel" #330
Comments
@peti Is this a spontaneous failure, or reproducible? |
It has happened in our builds more than once already, but it does not happen every time the build is run, i.e. I've seen that build succeed, too.
|
I'm not able to reproduce this issue locally. The script I use is: #!/bin/bash
set -o errexit
while :
do
./dist/build/spec/spec -m 'Test.Hspec.Core.Runner.hspecResult runs specs in parallel'
done The corresponding test case: it "runs specs in parallel" $ do
let n = 10
t = 0.01
dt = t * (fromIntegral n / 2)
r <- timeout dt . silence . withArgs ["-j", show n] . H.hspecResult . H.parallel $ do
replicateM_ n (H.it "foo" $ sleep t)
r `shouldBe` Just (H.Summary n 0) So what we are testing here is that Any suggestions on how to test this in a more robust way are welcome. |
Is this on NFS or something?
Yes. The build server uses both network file systems and virtual machines, which might cause some delays, and it also tends to be under an extremely high load.
|
One way to deal with it could be to skip that particular test by passing |
OK, I used that work-around in NixOS/cabal2nix@74d58ee. |
@peti I'm not aware of a way to make sure that this spontaneous failure can never ever happen. What I did is make it less likely. We spawn 100 jobs. Each job waits (before dc074ae this was |
OK, thank you very much for the effort you've put into this issue. I realize that testing concurrency is inherently difficult, especially if you don't control the test environment. |
Citing from https://nix-cache.s3.amazonaws.com/log/d7wb0k5k2vdnm92lrfri6clk32amqy8l-hspec-core-2.4.4.drv:
The text was updated successfully, but these errors were encountered: