Skip to content

Commit bfdc2c4

Browse files
committed
Multi component test: wait for reference ready
1 parent 7663637 commit bfdc2c4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ghcide/test/exe/Main.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5504,8 +5504,8 @@ simpleMultiTest2 = testCase "simple-multi-test2" $ runWithExtraFiles "multi" $ \
55045504
bPath = dir </> "b/B.hs"
55055505
bdoc <- openDoc bPath "haskell"
55065506
WaitForIdeRuleResult {} <- waitForAction "TypeCheck" bdoc
5507-
adoc@(TextDocumentIdentifier auri) <- openDoc aPath "haskell"
5508-
WaitForIdeRuleResult {} <- waitForAction "TypeCheck" adoc
5507+
TextDocumentIdentifier auri <- openDoc aPath "haskell"
5508+
skipManyTill anyMessage $ isReferenceReady aPath
55095509
locs <- getDefinitions bdoc (Position 2 7)
55105510
let fooL = mkL auri 2 0 2 3
55115511
checkDefs locs (pure [fooL])
@@ -5519,8 +5519,8 @@ simpleMultiTest3 = testCase "simple-multi-test3" $ runWithExtraFiles "multi" $ \
55195519
cPath = dir </> "c/C.hs"
55205520
bdoc <- openDoc bPath "haskell"
55215521
WaitForIdeRuleResult {} <- waitForAction "TypeCheck" bdoc
5522-
adoc@(TextDocumentIdentifier auri) <- openDoc aPath "haskell"
5523-
WaitForIdeRuleResult {} <- waitForAction "TypeCheck" adoc
5522+
TextDocumentIdentifier auri <- openDoc aPath "haskell"
5523+
skipManyTill anyMessage $ isReferenceReady aPath
55245524
cdoc <- openDoc cPath "haskell"
55255525
WaitForIdeRuleResult {} <- waitForAction "TypeCheck" cdoc
55265526
locs <- getDefinitions cdoc (Position 2 7)

0 commit comments

Comments
 (0)