-
Notifications
You must be signed in to change notification settings - Fork 336
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
[Flaky Test]: Fix flaky test TestMaxPendingChunkMessages() #1003
Conversation
267a39b
to
4e2f433
Compare
4e2f433
to
72f8e80
Compare
pulsar/message_chunking_test.go
Outdated
producerImpl.internalSingleSend( | ||
mm, | ||
msg.Payload, | ||
&sendRequest{ | ||
callback: func(id MessageID, producerMessage *ProducerMessage, err error) {}, | ||
msg: msg, | ||
}, | ||
uint32(internal.MaxMessageSize), | ||
) |
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.
We need to flush the producer after sending the message. Or handle the callback of the sendRequest
.
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.
We need to flush the producer after sending the message
OK, I will fix it.
@RobertIndie Can you retake a look? |
Ping @RobertIndie. |
Fixes #983
Motivation
Old TestMaxPendingChunkMessages() uses the concurrent message publish to make the consumer discard unavailable chunk. And it's flaky.
So the
sendSingeChunk()
is introduced to manual create scenarios where old chunks should be discarded.Modifications
TestMaxPendingChunkMessages()
Verifying this change