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

Write mock tests for concurrency issue in ChallengeBasedAuthenticationPolicy #10691

Closed
heaths opened this issue Mar 18, 2020 · 2 comments · Fixed by #10804
Closed

Write mock tests for concurrency issue in ChallengeBasedAuthenticationPolicy #10691

heaths opened this issue Mar 18, 2020 · 2 comments · Fixed by #10804
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. KeyVault
Milestone

Comments

@heaths
Copy link
Member

heaths commented Mar 18, 2020

We should use MockTransports to mock various concurrency scenarios for the fix made in PR #10673. We'll need to synchronize certain responses to simulate lag in concurrent calls.

Scenarios include, but are not limited to:

  1. Single-threaded call
  2. Simultaneous multi-threaded calls like in https://gist.github.com/heaths/87b6a2da1b9cdd5c88fe6c3dedb28216#file-program-cs
  3. Offset multi-threaded calls
  4. As a pivot, calls where the tenant (scope) change for the vault URI

/cc @schaabs if he has any more scenarios to add.

@heaths heaths added KeyVault Client This issue points to a problem in the data-plane of the library. labels Mar 18, 2020
@heaths heaths added this to the Backlog milestone Mar 18, 2020
@heaths heaths self-assigned this Mar 18, 2020
@schaabs
Copy link
Member

schaabs commented Mar 19, 2020

Also we should add tests for the service continually sending 401s so we ensure we don't get stuck in a loop that doesn't return to the client.

heaths added a commit to heaths/azure-sdk-for-net that referenced this issue Mar 25, 2020
heaths added a commit that referenced this issue Mar 26, 2020
* Initial single and concurrent requests

Resolves #10691

* More tests and perf improvements

* Remove Identity tests from solution

They require a special environment and stopped working 100% a while ago, and impact the successful completion of all tests here.

* Resolve PR feedback
@heaths heaths linked a pull request Apr 7, 2020 that will close this issue
@heaths
Copy link
Member Author

heaths commented Apr 7, 2020

This was resolved with #10804

@heaths heaths closed this as completed Apr 7, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Mar 28, 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. KeyVault
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants