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

test(plugin-server): Improve the robustness of overflow handling tests #21315

Merged
merged 3 commits into from
Apr 4, 2024

Conversation

tkaemming
Copy link
Contributor

Problem

#20945 (comment) seems like it should have been caught by tests but wasn't.

Changes

  • Replaces use of mocked producer with actual Kafka producer usage to make these tests more of an integration test.
  • Fixes some of the types and assertions so that they are more reflective of the code being tested

Does this work well for both Cloud and self-hosted?

N/A

How did you test this code?

(This one is hopefully obvious.)

Comment on lines -100 to -101
timestamp: captureEndpointEvent1['timestamp'],
offset: captureEndpointEvent1['offset'],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These were undefined so they weren't being considered in this assertion.

timestamp can be provided to produce, if we want to preserve it across rerouting.

@tkaemming tkaemming marked this pull request as ready for review April 3, 2024 19:42
@tkaemming tkaemming requested a review from a team April 3, 2024 19:42
@@ -109,23 +114,23 @@ describe('eachBatchParallelIngestion with overflow reroute', () => {

it('reroutes excess events to OVERFLOW topic', async () => {
Copy link
Contributor Author

@tkaemming tkaemming Apr 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't quite test this by cherry-picking the problematic change (because it also changed these tests), but #20945 (comment) would have caused this test to hang indefinitely now that it actually produces. This would have let us know something weird was going on earlier.

@tkaemming tkaemming merged commit 7e9d671 into master Apr 4, 2024
77 checks passed
@tkaemming tkaemming deleted the improve-ingestion-test-robustness branch April 4, 2024 14:58
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.

2 participants