projects
/
lsp-test.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ea0b532
)
Try to fix further timeout messages
author
Luke Lau
<luke_lau@icloud.com>
Sat, 8 Jun 2019 16:17:53 +0000
(17:17 +0100)
committer
Luke Lau
<luke_lau@icloud.com>
Sat, 8 Jun 2019 19:17:15 +0000
(20:17 +0100)
test/Test.hs
patch
|
blob
|
history
diff --git
a/test/Test.hs
b/test/Test.hs
index 07b95e34c568c333da2b8aaa2494a88d59a62d03..15f457f7852648082ed76a9334ff1da12b71dd9d 100644
(file)
--- a/
test/Test.hs
+++ b/
test/Test.hs
@@
-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"
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
withTimeout 3 $ getDocumentSymbols doc
+ -- longer than the original timeout
+ liftIO $ threadDelay (5 * 10^6)
-- shouldn't throw an exception
getDocumentSymbols doc
return ()
-- shouldn't throw an exception
getDocumentSymbols doc
return ()