Try to fix further timeout messages
[lsp-test.git] / 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 ()