Skip to content
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

Merged
merged 1 commit into from
Nov 10, 2023

Conversation

bogdandrutu
Copy link
Member

No description provided.

Copy link

linux-foundation-easycla bot commented Nov 8, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: bogdandrutu / name: Bogdan Drutu (0347416)

@bogdandrutu bogdandrutu marked this pull request as ready for review November 8, 2023 22:30
@bogdandrutu bogdandrutu requested review from a team and jpkrohling November 8, 2023 22:30
@bogdandrutu bogdandrutu force-pushed the simplifyqueue branch 2 times, most recently from 6e2fff4 to 9e68417 Compare November 8, 2023 22:52
@@ -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) {
Copy link
Member Author

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.

@dmitryax
Copy link
Member

dmitryax commented Nov 9, 2023

Submitted #8832 to make the test pass

bogdandrutu pushed a commit that referenced this pull request Nov 9, 2023
…nic (#8832)

Make the imitation of queue overflow more reliable to make the test pass
in #8829
@dmitryax
Copy link
Member

dmitryax commented Nov 9, 2023

@bogdandrutu please rebase

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
Copy link

codecov bot commented Nov 10, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Files Coverage Δ
...er/exporterhelper/internal/bounded_memory_queue.go 100.00% <100.00%> (+8.51%) ⬆️

... and 1 file with indirect coverage changes

📢 Thoughts on this report? Let us know!

@bogdandrutu bogdandrutu merged commit 786299f into open-telemetry:main Nov 10, 2023
32 checks passed
@bogdandrutu bogdandrutu deleted the simplifyqueue branch November 10, 2023 16:04
@github-actions github-actions bot added this to the next release milestone Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants