-
Notifications
You must be signed in to change notification settings - Fork 325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WPB-15208] kill more flakes #4392
Conversation
This reverts commit 5974b64.
semantic remains the same, but it's more coherent.
assertWebSocketDied :: (HasCallStack) => EventWebSocket -> App () | ||
assertWebSocketDied ws = do | ||
recpol <- do | ||
timeOutSeconds <- asks (.timeOutSeconds) | ||
pure $ limitRetriesByCumulativeDelay (timeOutSeconds * 1_000_000) (constantDelay 800_000) | ||
recoverAll recpol $ \_ -> | ||
assertNoEventHelper ws >>= \case | ||
NoEvent -> assertFailure $ "WebSocket is still open" | ||
WebSocketDied -> pure () |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we get a NoEvent
, and only then a WebSocketDied
, the previous version didn't work.
I'm trying magic here. I don't expect it to work, but I'd like to be proven wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
https://wearezeta.atlassian.net/browse/WPB-15208
Checklist
changelog.d