Skip to content

Commit fc534e3

Browse files
committed
Multi component test: wait for reference ready
1 parent 57ff47c commit fc534e3

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
@@ -5513,8 +5513,8 @@ simpleMultiTest2 = testCase "simple-multi-test2" $ runWithExtraFiles "multi" $ \
55135513
bPath = dir </> "b/B.hs"
55145514
bdoc <- openDoc bPath "haskell"
55155515
WaitForIdeRuleResult {} <- waitForAction "TypeCheck" bdoc
5516-
adoc@(TextDocumentIdentifier auri) <- openDoc aPath "haskell"
5517-
WaitForIdeRuleResult {} <- waitForAction "TypeCheck" adoc
5516+
TextDocumentIdentifier auri <- openDoc aPath "haskell"
5517+
skipManyTill anyMessage $ isReferenceReady aPath
55185518
locs <- getDefinitions bdoc (Position 2 7)
55195519
let fooL = mkL auri 2 0 2 3
55205520
checkDefs locs (pure [fooL])
@@ -5528,8 +5528,8 @@ simpleMultiTest3 = testCase "simple-multi-test3" $ runWithExtraFiles "multi" $ \
55285528
cPath = dir </> "c/C.hs"
55295529
bdoc <- openDoc bPath "haskell"
55305530
WaitForIdeRuleResult {} <- waitForAction "TypeCheck" bdoc
5531-
adoc@(TextDocumentIdentifier auri) <- openDoc aPath "haskell"
5532-
WaitForIdeRuleResult {} <- waitForAction "TypeCheck" adoc
5531+
TextDocumentIdentifier auri <- openDoc aPath "haskell"
5532+
skipManyTill anyMessage $ isReferenceReady aPath
55335533
cdoc <- openDoc cPath "haskell"
55345534
WaitForIdeRuleResult {} <- waitForAction "TypeCheck" cdoc
55355535
locs <- getDefinitions cdoc (Position 2 7)

0 commit comments

Comments
 (0)