Skip to content

[UAP] Fix UAP Windows unit test flake#2200

Draft
XuechunHou wants to merge 12 commits intomasterfrom
fix-uap-flakes
Draft

[UAP] Fix UAP Windows unit test flake#2200
XuechunHou wants to merge 12 commits intomasterfrom
fix-uap-flakes

Conversation

@XuechunHou
Copy link
Contributor

@XuechunHou XuechunHou commented Feb 6, 2026

Description

windowsEventLogger.Close() is called within the cancel function when either of the two sub-agent processes exits. These sub-agent processes are spawned as separate goroutines. The cancel function logs any error messages before calling Close() on the Windows event logger. The crash occurs when one subprocess exits and closes the eventLogger while the other subprocess is still attempting to access it to log errors.

The fix to it is to handle windows event logger creation and closing inside main.go function. The entire UAP plugin is essentially an RPC server, the windows event logger is now created before the server starts listening for requests (blocking), and closed when server stops serving.

Related issue

b/465497407

How has this been tested?

UAP windows unit tests should not flake anymore

Checklist:

  • Unit tests
    • Unit tests do not apply.
    • Unit tests have been added/modified and passed for this PR.
  • Integration tests
    • Integration tests do not apply.
    • Integration tests have been added/modified and passed for this PR.
  • Documentation
    • This PR introduces no user visible changes.
    • This PR introduces user visible changes and the corresponding documentation change has been made.
  • Minor version bump
    • This PR introduces no new features.
    • This PR introduces new features, and there is a separate PR to bump the minor version since the last release already.
    • This PR bumps the version.

@XuechunHou XuechunHou removed the request for review from franciscovalentecastro February 6, 2026 21:17
@XuechunHou XuechunHou marked this pull request as draft February 6, 2026 21:17
@XuechunHou XuechunHou changed the title Fix UAP Windows TestStart unit test flake [UAP] Do not redirect Plugin self log to windows event logs Feb 6, 2026
@XuechunHou XuechunHou changed the title [UAP] Do not redirect Plugin self log to windows event logs [UAP] Do not redirect Plugin self logs to windows event log Feb 6, 2026
@XuechunHou XuechunHou changed the title [UAP] Do not redirect Plugin self logs to windows event log [UAP] Fix UAP Windows unit test flake Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant