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

Make Event Processor Client Tests more deterministic #7458

Closed
kinelski opened this issue Sep 3, 2019 · 2 comments
Closed

Make Event Processor Client Tests more deterministic #7458

kinelski opened this issue Sep 3, 2019 · 2 comments
Labels
Client This issue points to a problem in the data-plane of the library. Event Hubs
Milestone

Comments

@kinelski
Copy link
Member

kinelski commented Sep 3, 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 on the WaitStabilization method before actually performing assertions, an approach that may result in flaky behavior. This method keeps track of all active Event Processors' owned partitions, and it considers stabilization to be achieved once the partition load distribution hasn't changed after a few cycles. It gives up and throws an error if it takes more than 1 minute.

https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/eventhub/Azure.Messaging.EventHubs/tests/Processor/EventProcessorClientLiveTests.cs#L68-L70

Out of Scope

  • Creation of new tests for additional coverage.

Success Criteria

  • The EventProcessorClient tests have been refactored and produce consistent and deterministic results.

  • The existing test suite continues to produce deterministic results and pass reliably.

@triage-new-issues triage-new-issues bot added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Sep 3, 2019
@kinelski kinelski added Client This issue points to a problem in the data-plane of the library. Event Hubs and removed needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. labels Sep 3, 2019
@jsquire jsquire removed their assignment Sep 20, 2019
@jsquire jsquire added this to the Sprint 159 milestone Sep 20, 2019
@jsquire jsquire modified the milestones: Sprint 159, Backlog Oct 31, 2019
@jsquire jsquire changed the title [EventHubs] Make Event Processor Live Tests more deterministic Make Event Processor Client Live Tests more deterministic Oct 31, 2019
@jsquire jsquire modified the milestones: Backlog, [2020] January Dec 9, 2019
@jsquire jsquire changed the title Make Event Processor Client Live Tests more deterministic Make Event Processor Client Tests more deterministic Dec 9, 2019
@jsquire jsquire assigned kinelski and ShivangiReja and unassigned kinelski Dec 10, 2019
@jsquire jsquire modified the milestones: [2020] February, Backlog Feb 10, 2020
@jsquire
Copy link
Member

jsquire commented Feb 10, 2020

This scope will likely be addressed as part of a community contribution to remove the load balancer and refactor it into a stand-alone offering. Shifting this back to the backlog until those efforts are complete and will reevaluate then.

christothes added a commit to christothes/azure-sdk-for-net that referenced this issue Feb 24, 2020
kinelski pushed a commit that referenced this issue Feb 25, 2020
* delete obsolete tests

* fixes some flaky tests for #7458

* delete commented line

* pr comments
@jsquire
Copy link
Member

jsquire commented Apr 2, 2020

Test stability was addressed as part of the recent overhaul of the EventProcessorClient (#10843). This issue is no longer necessary.

@jsquire jsquire closed this as completed Apr 2, 2020
@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

3 participants