-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Simplify logic in boundedMemoryQueue, use channels len/cap #8829
Conversation
|
6e2fff4
to
9e68417
Compare
@@ -247,11 +247,24 @@ func (s *consumerState) assertConsumed(expected map[string]bool) { | |||
assert.Equal(s.t, expected, s.snapshot()) | |||
} | |||
|
|||
func TestZeroSize(t *testing.T) { | |||
func TestZeroSizeWithConsumers(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.
There is a small behavior change here if capacity/size is 0 and numConsumers >0. But this is not a valid case in QueueConfig, see Validate so we should not worry.
Submitted #8832 to make the test pass |
@bogdandrutu please rebase |
Signed-off-by: Bogdan Drutu <[email protected]>
9e68417
to
0347416
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
... and 1 file with indirect coverage changes 📢 Thoughts on this report? Let us know! |
No description provided.