Increase timings of concurrency tests due to flaky windows runs

This commit is contained in:
Fabián Heredia Montiel 2020-12-07 14:33:56 -06:00 committed by G. Allais
parent 1dba32a0c4
commit 87358f19da

View File

@ -11,11 +11,11 @@ constant = do
let a = await $ fork "String"
putStrLn a
-- Issue related to usleep in MacOS brew sleep
-- Issue related to usleep in MacOS brew chez
macsleep : (us : Int) -> So (us >= 0) => IO ()
macsleep us =
if (os == "darwin")
then sleep (us `div` 1000)
then sleep (us `div` 10000)
else usleep us
partial
@ -28,7 +28,7 @@ futureHelloWorld (us, n) with (choose (us >= 0))
partial
simpleIO : IO (List Unit)
simpleIO = do
futures <- sequence $ futureHelloWorld <$> [(3000, "World"), (1000, "Bar"), (0, "Foo"), (2000, "Idris")]
futures <- sequence $ futureHelloWorld <$> [(30000, "World"), (10000, "Bar"), (0, "Foo"), (20000, "Idris")]
let awaited = await <$> futures
pure awaited
@ -40,16 +40,16 @@ erasureAndNonbindTest = do
_ <- forkIO $ do
putStrLn "This line is printed"
notUsed <- forkIO $ do
macsleep 1000
macsleep 10000
putStrLn "This line is also printed"
let _ = nonbind
let n = nonbind
macsleep 2000 -- Even if not explicitly awaited, we should let threads finish before exiting
macsleep 20000 -- Even if not explicitly awaited, we should let threads finish before exiting
map : IO ()
map = do
future1 <- forkIO $ do
macsleep 1000
macsleep 10000
putStrLn "#2"
let future3 = map (const "#3") future1
future2 <- forkIO $ do