Skip to content

Commit cfbc9c5

Browse files
authored
Fix non-determinism in boot-def test (#1483)
1 parent e7cad27 commit cfbc9c5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: ghcide/test/exe/Main.hs

+5
Original file line numberDiff line numberDiff line change
@@ -4608,6 +4608,11 @@ bootTests = testCase "boot-def-test" $ runWithExtraFiles "boot" $ \dir -> do
46084608
liftIO $ runInDir dir $ do
46094609
cDoc <- createDoc cPath "haskell" cSource
46104610
_ <- getHover cDoc $ Position 4 3
4611+
~() <- skipManyTill anyMessage $ satisfyMaybe $ \case
4612+
FromServerMess (SCustomMethod "ghcide/reference/ready") (NotMess NotificationMessage{_params = fp}) -> do
4613+
A.Success fp' <- pure $ fromJSON fp
4614+
if equalFilePath fp' cPath then pure () else Nothing
4615+
_ -> Nothing
46114616
closeDoc cDoc
46124617

46134618
cdoc <- createDoc cPath "haskell" cSource

0 commit comments

Comments
 (0)