From f1ace2384abb1af43d54e0170a476531a79e0efa Mon Sep 17 00:00:00 2001 From: Zubin Duggal Date: Wed, 3 Mar 2021 16:57:05 +0530 Subject: [PATCH] Fix non-determinism in boot-def test --- ghcide/test/exe/Main.hs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ghcide/test/exe/Main.hs b/ghcide/test/exe/Main.hs index e9fd1d89ca..25a269ff71 100644 --- a/ghcide/test/exe/Main.hs +++ b/ghcide/test/exe/Main.hs @@ -4608,6 +4608,11 @@ bootTests = testCase "boot-def-test" $ runWithExtraFiles "boot" $ \dir -> do liftIO $ runInDir dir $ do cDoc <- createDoc cPath "haskell" cSource _ <- getHover cDoc $ Position 4 3 + ~() <- skipManyTill anyMessage $ satisfyMaybe $ \case + FromServerMess (SCustomMethod "ghcide/reference/ready") (NotMess NotificationMessage{_params = fp}) -> do + A.Success fp' <- pure $ fromJSON fp + if equalFilePath fp' cPath then pure () else Nothing + _ -> Nothing closeDoc cDoc cdoc <- createDoc cPath "haskell" cSource