diff options
author | Ben Gamari <bgamari.foss@gmail.com> | 2017-04-04 20:48:35 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-04-04 20:48:36 -0400 |
commit | 37d7c1596ee936ec6597a5c1898e1fdca7c04f77 (patch) | |
tree | 6d30954a94ead58a016d233dbb81f5d49a09c301 /libraries | |
parent | 3d523fd990bbb31ca97ea22059ec9d53f0705d8c (diff) | |
download | haskell-37d7c1596ee936ec6597a5c1898e1fdca7c04f77.tar.gz |
base: Add test for #8684
Reviewers: austin, hvr
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3420
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/base/tests/T8684.hs | 16 | ||||
-rw-r--r-- | libraries/base/tests/all.T | 1 |
2 files changed, 17 insertions, 0 deletions
diff --git a/libraries/base/tests/T8684.hs b/libraries/base/tests/T8684.hs new file mode 100644 index 0000000000..87a37690b2 --- /dev/null +++ b/libraries/base/tests/T8684.hs @@ -0,0 +1,16 @@ +import Control.Concurrent +import System.IO +import System.Timeout + +main :: IO () +main = do + forkIO $ do + threadDelay (5 * 1000000) + -- The timeout should terminate before we ever make it here + putStrLn "t=5 seconds: we shouldn't be here" + + timeout (1 * 1000000) $ do + hWaitForInput stdin (10 * 1000) + putStrLn "we shouldn't be here" + + return () diff --git a/libraries/base/tests/all.T b/libraries/base/tests/all.T index 49298d3524..69705bc91e 100644 --- a/libraries/base/tests/all.T +++ b/libraries/base/tests/all.T @@ -189,6 +189,7 @@ test('T9681', normal, compile_fail, ['']) test('T8089', [exit_code(99), run_timeout_multiplier(0.01)], compile_and_run, ['']) +test('T8684', expect_broken(8684), compile_and_run, ['']) test('T9826',normal, compile_and_run,['']) test('T9848', [ stats_num_field('bytes allocated', |