You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Diagnostics: Fixes flaky Request_AuthorizationHeader_IsRedactedInEtwPayload CI failure
The test's CapturingEventListener relied on OnEventSourceCreated to call
EnableEvents. Under parallel CI execution the base EventListener ctor
can dispatch OnEventSourceCreated on the constructing thread before the
derived class fields are initialized (and before any prior listener in
the shared test process has released its hold on the singleton), so the
callback would not reliably subscribe this listener to DocumentDBClient.
Fix: resolve DocumentClientEventSource.Instance first, pass it into the
listener, and call EnableEvents explicitly after base construction. Also
filter OnEventWritten to the targeted EventSource and guard against the
pre-initialization null-field path.
Verified: the two DocumentClientEventSourceTests pass 5/5 consecutive
runs locally.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
0 commit comments