-
Notifications
You must be signed in to change notification settings - Fork 524
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
Add PartitionReader.WaitReadConsistencyUntilOffset() #8809
Conversation
Signed-off-by: Marco Pracucci <marco@pracucci.com>
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, only a comment about the tests
@@ -172,165 +172,217 @@ func TestPartitionReader_WaitReadConsistency(t *testing.T) { | |||
t.Run("should return after all produced records have been consumed", func(t *testing.T) { | |||
t.Parallel() | |||
|
|||
consumedRecords := atomic.NewInt64(0) | |||
for _, withOffset := range []bool{false, true} { | |||
t.Run(fmt.Sprintf("with offset %v", withOffset), func(t *testing.T) { |
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.
these tests should be Parallel()
too, right?
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.
same applies to the other tests in the file
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.
Yep good point, will do, thanks
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.
Done in 75edef3
…roducedOffset_And_WaitReadConsistencyUntilOffset() Signed-off-by: Marco Pracucci <marco@pracucci.com>
What this PR does
This is another preliminary to ease the review of #8808. In this PR I'm adding
PartitionReader.WaitReadConsistencyUntilOffset()
which is likeWaitReadConsistencyUntilLastProducedOffset()
but allows to specify the offset to wait for.Note to reviewers:
Which issue(s) this PR fixes or relates to
N/A
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
.about-versioning.md
updated with experimental features.