commercialhaskell / commercialhaskell/stack

Ctrl+C on stack test orphans child process

Open
#4,416 9 comments 0 reactions 0 assignees View on GitHub
component: testing
Dominant language
Haskell
Stars
4.1k
Forks
850
Avg merge
10h 37m
Merged PRs (30d)
4

Description

With some `hspec` code I'm currently writing, I noticed that when I run this

```haskell
import Test.Hspec
import Test.Hspec.QuickCheck (modifyMaxSize)
import qualified Test.QuickCheck as QC
import qualified Test.QuickCheck.Monadic as QCM
import Test.QuickCheck.Instances.ByteString ()

--- ...

describe "Identity" $ do
modifyMaxSize (const 1000) $ it "compress and decompress arbitrary strings"$
QC.property $ \bsList -> QCM.monadicIO $ do
QCM.run $ hPutStrLn stderr (show $ sum $ map BS.length bsList) -- extremely slow
QCM.assert True
```

and it runs and I press Ctrl+C, it keeps polluting my shell prompt.

This suggests that my Ctrl+C kills `stack` but not the test it launches.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.