Add e2e concurrent/stress test for AcquireTokenSilent via broker, Fixes AB#3582859#2504
Add e2e concurrent/stress test for AcquireTokenSilent via broker, Fixes AB#3582859#2504Copilot wants to merge 14 commits into
Conversation
Agent-Logs-Url: https://github.com/AzureAD/microsoft-authentication-library-for-android/sessions/307f6292-e801-441e-b3b9-0594c2965c47 Co-authored-by: rpdome <19558668+rpdome@users.noreply.github.com>
Agent-Logs-Url: https://github.com/AzureAD/microsoft-authentication-library-for-android/sessions/307f6292-e801-441e-b3b9-0594c2965c47 Co-authored-by: rpdome <19558668+rpdome@users.noreply.github.com>
|
❌ Work item link check failed. Description does not contain AB#{ID}. Click here to Learn more. |
|
@copilot this should serve as a stress test as well. Increase the amount of thread and execution per thread to match with the UI. (I assume you cannot use the test app for some reason, which is okay). |
…ch UI defaults Agent-Logs-Url: https://github.com/AzureAD/microsoft-authentication-library-for-android/sessions/9d380b7c-0d04-493b-9c93-4da189f60d79 Co-authored-by: rpdome <19558668+rpdome@users.noreply.github.com>
|
@copilot consider sharing the concurrency implementation between the automation library and msaltestapp |
Done in commit a54f69d. Updated to match the UI defaults exactly:
The test now uses a |
There was a problem hiding this comment.
Pull request overview
This PR introduces a new concurrency/stress scenario for brokered AcquireTokenSilent: (1) an executor utility intended to power the testapp’s “Run Concurrent” UI, and (2) a new broker E2E instrumentation test that launches multiple acquireTokenSilentAsync requests simultaneously and fails if any callback gets stuck.
Changes:
- Add
ConcurrentAcquireTokenExecutorimplementation for the testapp concurrent ATS UI flow. - Add a new broker E2E instrumentation test that runs concurrent
AcquireTokenSilentwithforceRefresh=trueand a global completion timeout.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
testapps/testapp/src/main/java/com/microsoft/identity/client/testapp/ConcurrentAcquireTokenExecutor.java |
Adds an executor to run concurrent silent-token waves and report progress back to the UI. |
msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/concurrent/TestCaseConcurrentAcquireTokenSilent.java |
Adds an instrumentation test that stresses brokered silent requests with coordinated concurrency and stuck detection. |
…mentation Agent-Logs-Url: https://github.com/AzureAD/microsoft-authentication-library-for-android/sessions/c2526c05-1dd7-4d17-bdac-b8b65a7d7ba0 Co-authored-by: rpdome <19558668+rpdome@users.noreply.github.com>
Agent-Logs-Url: https://github.com/AzureAD/microsoft-authentication-library-for-android/sessions/c2526c05-1dd7-4d17-bdac-b8b65a7d7ba0 Co-authored-by: rpdome <19558668+rpdome@users.noreply.github.com>
Done in commit 588db9c. Extracted a new
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot can we move the shared code into uiautomationutilities and have the test app consume it? What's the downside? |
Technically possible, but the downsides are meaningful:
The current approach — both sides implement the same pattern, with Javadoc cross-references — avoids all of the above while keeping the code trivially readable in each module. Happy to make the change if you feel the reuse outweighs these costs. |
…lly in helper Agent-Logs-Url: https://github.com/AzureAD/microsoft-authentication-library-for-android/sessions/950932aa-114e-4f33-ba7f-a6abd4506823 Co-authored-by: rpdome <19558668+rpdome@users.noreply.github.com>
Removed in commit 85f1ca2. |
…estapp/ConcurrentAcquireTokenExecutor.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
❌ Invalid work item number: AB#3582859 ##. Work item number must be a valid integer. Click here to learn more. |
1 similar comment
|
❌ Invalid work item number: AB#3582859 ##. Work item number must be a valid integer. Click here to learn more. |
…OPE_POOL with Kotlin counterpart Agent-Logs-Url: https://github.com/AzureAD/microsoft-authentication-library-for-android/sessions/0ff28edf-f07f-4479-974b-f790a095ce04 Co-authored-by: rpdome <19558668+rpdome@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
❌ Work item link check failed. Description does not contain AB#{ID}. Click here to Learn more. |
|
✅ Work item link check complete. Description contains link AB#3582859 to an Azure Boards work item. |
|
@copilot apply changes based on the comments in this thread |
…patch try/catch, richer error messages Agent-Logs-Url: https://github.com/AzureAD/microsoft-authentication-library-for-android/sessions/3b42a162-07a3-4bfb-9b33-bf29afe1d139 Co-authored-by: rpdome <19558668+rpdome@users.noreply.github.com>
Done in commit 79ad944. Applied all four items from that review:
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
❌ Work item link check failed. Description does not contain AB#{ID}. Click here to Learn more. |
startBarrier(stale automated-reviewer comment)ConcurrentAcquireTokenSilentHelper.run()(threadCount/iterations/perWaveTimeoutSec > 0)InterruptedExceptionhandling in barrier catch block (restores interrupt status)requester.request()intry/catch(Throwable)with latch countDown on synchronous throwexception.getErrorCode()+exception.toString()in test error recording