Skip to content

Conversation

kaisong1990
Copy link
Contributor

Proposed changes

This pull request updates the MSALAcquireTokenViewController to support scheduled pressure testing using a timer. The main change is the addition of a timer-based mechanism to repeatedly execute a token acquisition task every 5 minutes when XPC pressure testing is enabled.

Pressure test automation:

  • Added a new NSTimer property to the MSALAcquireTokenViewController to manage scheduled tasks.
  • Implemented logic in acquireTokenSilent: to schedule a timer that fires every 5 minutes, executing a block that performs a series of token acquisition requests. The block now runs 5 iterations instead of 100 for each timer event. [1] [2]
  • Added a handleTimer: method to invoke the scheduled task block when the timer fires.

Type of change

  • Feature work
  • Bug fix
  • Documentation
  • Engineering change
  • Test
  • Logging/Telemetry

Risk

  • High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
  • Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
  • Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

Additional information

@Copilot Copilot AI review requested due to automatic review settings September 9, 2025 20:16
@kaisong1990 kaisong1990 requested a review from a team as a code owner September 9, 2025 20:16
@kaisong1990 kaisong1990 added the XPC label Sep 9, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request updates the XPC pressure testing functionality in the MSAL Mac test app to use a scheduled timer approach instead of a blocking loop. The change improves the testing mechanism by reducing the number of iterations per execution and spreading them out over time.

  • Replaces blocking loop with NSTimer-based scheduling for pressure tests
  • Reduces iterations from 100 to 5 per execution cycle
  • Adds timer management with 5-minute intervals

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@kaisong1990 kaisong1990 merged commit d63bdda into dev Sep 10, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants