Skip to content

Commit 93ea4a0

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 d0e9055 commit 93ea4a0

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
@@ -2681,6 +2681,9 @@ ifaceErrorTest = testCase "iface-error-test-1" $ runWithExtraFiles "recomp" $ \d
26812681
liftIO $ assertBool ("Couldn't find B.hi in " ++ hidir) hi_exists
26822682

26832683
pdoc <- openDoc pPath "haskell"
2684+
expectDiagnostics
2685+
[("P.hs", [(DsWarning,(4,0), "Top-level binding")])
2686+
]
26842687
waitForProgressDone
26852688
changeDoc pdoc [TextDocumentContentChangeEvent Nothing Nothing $ pSource <> "\nfoo = y :: Bool" ]
26862689
-- Now in P we have

0 commit comments

Comments
 (0)