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

[EventHubs] Make Event Processor Live Tests more deterministic #7375

Closed
kinelski opened this issue Aug 22, 2019 · 1 comment
Closed

[EventHubs] Make Event Processor Live Tests more deterministic #7375

kinelski opened this issue Aug 22, 2019 · 1 comment
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. Event Hubs

Comments

@kinelski
Copy link
Member

kinelski commented Aug 22, 2019

Summary

Event Processors, once initialized, demand some time before stabilizing. This happens because of the internal load balancing, which tries to distribute partition processing responsibility among Event Processors in the most balanced way.

The Event Processor Live Tests currently rely only on delays to assert stability before actually performing assertions, an approach that may result in flaky behavior.

// Make sure the event processors have enough time to stabilize.
// TODO: we'll probably need to extend this delay once load balancing is implemented.
await Task.Delay(5000);

For reference purposes: all aforementioned delays are preceded by a comment with the word stabilize.

Goal

Reduce the flakiness by monitoring the partition distribution instead of relying on delays. Once a balanced status has been achieved, proceed with the testing.

Things to keep in mind:

  • We should only recognize a balanced status when it hasn't changed for a certain amount of time.
  • We should have a timeout to abort the verification in case it takes too long. In this situation, something unexpected has happened.
@kinelski
Copy link
Member Author

kinelski commented Sep 4, 2019

Issue solved by: #7414
New related issue: #7458

@kinelski kinelski closed this as completed Sep 4, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Mar 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. Event Hubs
Projects
None yet
Development

No branches or pull requests

2 participants