File tree 1 file changed +7
-9
lines changed
1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -4997,18 +4997,16 @@ clientSettingsTest :: TestTree
4997
4997
clientSettingsTest = testGroup " client settings handling"
4998
4998
[ testSession " ghcide restarts shake session on config changes" $ do
4999
4999
void $ skipManyTill anyMessage $ message SClientRegisterCapability
5000
+ waitForProgressDone
5000
5001
sendNotification SWorkspaceDidChangeConfiguration (DidChangeConfigurationParams (toJSON (" " :: String )))
5001
- nots <- skipManyTill anyMessage $ count 3 loggingNotification
5002
- isMessagePresent " Restarting build session" (map getLogMessage nots)
5002
+ skipManyTill anyMessage restartingBuildSession
5003
5003
5004
5004
]
5005
- where getLogMessage :: FromServerMessage -> T. Text
5006
- getLogMessage (FromServerMess SWindowLogMessage (NotificationMessage _ _ (LogMessageParams _ msg))) = msg
5007
- getLogMessage _ = " "
5008
-
5009
- isMessagePresent expectedMsg actualMsgs = liftIO $
5010
- assertBool (" \" " ++ expectedMsg ++ " \" is not present in: " ++ show actualMsgs)
5011
- (any ((expectedMsg `isSubsequenceOf` ) . show ) actualMsgs)
5005
+ where
5006
+ restartingBuildSession :: Session ()
5007
+ restartingBuildSession = do
5008
+ FromServerMess SWindowLogMessage NotificationMessage {_params = LogMessageParams {.. }} <- loggingNotification
5009
+ guard $ " Restarting build session" `T.isInfixOf` _message
5012
5010
5013
5011
referenceTests :: TestTree
5014
5012
referenceTests = testGroup " references"
You can’t perform that action at this time.
0 commit comments