Try to fix further timeout messages
authorLuke Lau <luke_lau@icloud.com>
Sat, 8 Jun 2019 16:17:53 +0000 (17:17 +0100)
committerLuke Lau <luke_lau@icloud.com>
Sat, 8 Jun 2019 19:17:15 +0000 (20:17 +0100)
test/Test.hs

index 07b95e34c568c333da2b8aaa2494a88d59a62d03..15f457f7852648082ed76a9334ff1da12b71dd9d 100644 (file)
@@ -62,8 +62,12 @@ main = hspec $ do
 
       it "further timeout messages are ignored" $ runSessionWithConfig (defaultConfig { logStdErr = True }) "hie -d --vomit" fullCaps "test/data/renamePass" $ do
         doc <- openDoc "Desktop/simple.hs" "haskell"
-        waitForDiagnostics
+        -- warm up the cache
+        getDocumentSymbols doc
+        -- shouldn't timeout
         withTimeout 3 $ getDocumentSymbols doc
+        -- longer than the original timeout
+        liftIO $ threadDelay (5 * 10^6)
         -- shouldn't throw an exception
         getDocumentSymbols doc
         return ()