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
test: harden EventsBySliceFirehoseSpec, #31979 #31981
test: harden EventsBySliceFirehoseSpec, #31979 #31981
Conversation
20ce538
to
ace3e41
Compare
@@ -265,6 +268,7 @@ class EventsBySliceFirehoseSpec | |||
catchupPublisher(1).sendNext(allEnvelopes(0)) | |||
outProbe(0).expectNext(allEnvelopes(0)) | |||
outProbe(1).expectNext(allEnvelopes(0)) | |||
|
|||
firehosePublisher.sendNext(allEnvelopes(0)) | |||
// this "sleep" is needed so that the firehose envelope is received first | |||
outProbe.expectNoMessage() |
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.
seems like I had some similar problem with another test
catchupPublisher(0).sendNext(allEnvelopes(0)) | ||
catchupPublisher(1).sendNext(allEnvelopes(0)) | ||
outProbe(0).expectNext(allEnvelopes(0)) | ||
outProbe(1).expectNext(allEnvelopes(0)) | ||
|
||
firehosePublisher.sendNext(allEnvelopes(0)) | ||
// this "sleep" is needed so that the firehose envelope is received first | ||
outProbe.expectNoMessage() |
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.
not great that it's timing sensitive, but don't know an easy way to solve that
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.
I don't think we can do better than that.
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
catchupPublisher(0).sendNext(allEnvelopes(0)) | ||
catchupPublisher(1).sendNext(allEnvelopes(0)) | ||
outProbe(0).expectNext(allEnvelopes(0)) | ||
outProbe(1).expectNext(allEnvelopes(0)) | ||
|
||
firehosePublisher.sendNext(allEnvelopes(0)) | ||
// this "sleep" is needed so that the firehose envelope is received first | ||
outProbe.expectNoMessage() |
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.
I don't think we can do better than that.
References #31979