@@ -17,6 +17,7 @@ import Development.IDE.Test (diagnostic,
1717 expectDiagnosticsWithTags ,
1818 expectNoMoreDiagnostics ,
1919 flushMessages , waitForAction ,
20+ waitForBuildQueue ,
2021 waitForTypecheck )
2122import Development.IDE.Types.Location
2223import qualified Language.LSP.Protocol.Lens as L
@@ -35,6 +36,8 @@ import Control.Lens ((^.))
3536import Control.Monad.Extra (whenJust )
3637import Development.IDE.Plugin.Test (WaitForIdeRuleResult (.. ))
3738import System.Time.Extra
39+ import Test.Hls (waitForKickDone ,
40+ waitForKickStart )
3841import Test.Tasty
3942import Test.Tasty.HUnit
4043import TestUtils
@@ -268,6 +271,9 @@ tests = testGroup "diagnostics"
268271 _ <- createDoc " ModuleA.hs-boot" " haskell" contentAboot
269272 _ <- createDoc " ModuleB.hs" " haskell" contentB
270273 _ <- createDoc " ModuleB.hs-boot" " haskell" contentBboot
274+ -- waitForKickStart
275+ -- waitForKickDone
276+ liftIO $ sleep 1
271277 expectDiagnostics [(" ModuleB.hs" , [(DiagnosticSeverity_Warning , (3 ,0 ), " Top-level binding" )])]
272278 , testSessionWait " correct reference used with hs-boot" $ do
273279 let contentB = T. unlines
@@ -482,7 +488,7 @@ tests = testGroup "diagnostics"
482488 adoc <- createDoc aPath " haskell" aSource
483489 changeDoc adoc [TextDocumentContentChangeEvent . InR . TextDocumentContentChangeWholeDocument $
484490 T. unlines [" module A where" , " import B" , " x :: Bool" , " x = y" ]]
485-
491+ waitForBuildQueue
486492 expectDiagnostics
487493 [ ( " P.hs" ,
488494 [ (DiagnosticSeverity_Error , (4 , 6 ), " Couldn't match expected type 'Int' with actual type 'Bool'" ),
0 commit comments