Skip to content

Commit fa393f4

Browse files
committed
Make iface-error-test-1 more reliable
The diagnostics can arrive either before or after progress completed, so there's a race condition here: if they arrive after, then the test script will get confused
1 parent 85f7881 commit fa393f4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ghcide/test/exe/Main.hs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2709,6 +2709,9 @@ ifaceErrorTest = testCase "iface-error-test-1" $ runWithExtraFiles "recomp" $ \d
27092709
liftIO $ assertBool ("Couldn't find B.hi in " ++ hidir) hi_exists
27102710

27112711
pdoc <- openDoc pPath "haskell"
2712+
expectDiagnostics
2713+
[("P.hs", [(DsWarning,(4,0), "Top-level binding")])
2714+
]
27122715
waitForProgressDone
27132716
changeDoc pdoc [TextDocumentContentChangeEvent Nothing Nothing $ pSource <> "\nfoo = y :: Bool" ]
27142717
-- Now in P we have

0 commit comments

Comments
 (0)