X-Git-Url: https://git.lukelau.me/?a=blobdiff_plain;f=test%2FTest.hs;h=cdcdf5d37d5c5fedf093b0d638b20e4f25ff5d29;hb=67a10d32f425d6bc4d37aa3046f051a4b7e66e26;hp=07b95e34c568c333da2b8aaa2494a88d59a62d03;hpb=ea0b53220519e178ca27e23c2a3be47fcf819afa;p=lsp-test.git diff --git a/test/Test.hs b/test/Test.hs index 07b95e3..cdcdf5d 100644 --- a/test/Test.hs +++ b/test/Test.hs @@ -60,10 +60,14 @@ main = hspec $ do withTimeout 5 $ skipManyTill anyMessage publishDiagnosticsNotification in void $ timeout 6000000 sesh - it "further timeout messages are ignored" $ runSessionWithConfig (defaultConfig { logStdErr = True }) "hie -d --vomit" fullCaps "test/data/renamePass" $ do + it "further timeout messages are ignored" $ runSession "hie" 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 ()