Skip to content

Re-enable binder tracing tests disabled during reflection invoke work - #132114

Merged
elinor-fung merged 6 commits into
mainfrom
copilot/update-bindertracingtest-assemblyloadcontextresolv
Aug 20, 2026
Merged

Re-enable binder tracing tests disabled during reflection invoke work#132114
elinor-fung merged 6 commits into
mainfrom
copilot/update-bindertracingtest-assemblyloadcontextresolv

Conversation

CopilotAI commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

The tests pass on main and the original issue no longer seems to be a problem.

cc @dotnet/appmodel @AaronRobinsonMSFT

CopilotAI lite review requested due to automatic review settings August 11, 2026 05:23

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
16 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Co-authored-by: elinor-fung <47805090+elinor-fung@users.noreply.github.com>
CopilotAI review requested due to automatic review settings August 11, 2026 05:47
CopilotAI changed the title [WIP] Update BinderTracingTest to not assume reflection semanticsUpdate BinderTracing resolving callback expectationsAug 11, 2026
CopilotAI requested a review from elinor-fungAugust 11, 2026 05:48

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review details

  • Files reviewed: 1/1 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Co-authored-by: elinor-fung <47805090+elinor-fung@users.noreply.github.com>
CopilotAI review requested due to automatic review settings August 11, 2026 17:25

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review details

Suppressed comments (2)

src/tests/Loader/binding/tracing/BinderTracingTest.cs:209

  • ValidateSingleBind now validates each candidate by calling ValidateBindOperation inside a predicate. This uses exceptions for control flow and also triggers the Console.WriteLine in ValidateBindOperation for every candidate, which can inflate test output and slow the run when multiple events are present. Consider a fast path for the common single-event case, and count matches without allocating a list.
 Console.WriteLine($"[{DateTime.Now:T}] Validating bind operation for {assemblyName}...");
BindOperation[] binds = listener.WaitAndGetEventsForAssembly(assemblyName);
List<BindOperation> matchingBinds = binds
.Where(bind => Helpers.ValidateBindOperationOrReturnFalse(expected, bind))
.ToList();

src/tests/Loader/binding/tracing/Helpers.cs:55

  • The helper name ValidateBindOperationOrReturnFalse isn’t idiomatic for a boolean-returning “try” pattern, and it reads like control-flow rather than intent. Consider renaming to a Try* name (e.g., TryValidateBindOperation) to make predicate-style usage clearer.
 internal static bool ValidateBindOperationOrReturnFalse(BindOperation expected, BindOperation actual)
{
try
{
ValidateBindOperation(expected, actual);
return true;
}
catch (Xunit.Sdk.XunitException)
{
return false;
}
}
  • Files reviewed: 4/4 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Co-authored-by: elinor-fung <47805090+elinor-fung@users.noreply.github.com>
CopilotAI review requested due to automatic review settings August 12, 2026 22:04

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review details

  • Files reviewed: 2/2 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Co-authored-by: elinor-fung <47805090+elinor-fung@users.noreply.github.com>
CopilotAI review requested due to automatic review settings August 12, 2026 22:18

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review details

Suppressed comments (1)

src/tests/Loader/binding/tracing/BinderTracingTest.EventHandlers.cs:42

  • PR description says "Fixes #68521", but the suite still contains at least one BinderTest explicitly skipped for that same issue (e.g., AssemblyLoadFromResolveHandler_MissingDependency is still annotated with activeIssue: #68521). Either remove the "Fixes" claim from the PR description or update/unskip the remaining test(s) and adjust expectations so the issue is actually resolved end-to-end.
 List<HandlerInvocation> invocations = handlers.Invocations.Where(invocation => Helpers.AssemblyNamesMatch(invocation.AssemblyName, assemblyName)).ToList();
Assert.Single(invocations);
Assert.Empty(handlers.Binds);
  • Files reviewed: 2/2 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

CopilotAI review requested due to automatic review settings August 13, 2026 17:37

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review details

Suppressed comments (2)

src/tests/Loader/binding/tracing/BinderTracingTest.ResolutionFlow.cs:76

  • PR description says BinderTracing resolving callback expectations were updated (e.g., filtering recorded callbacks to the requested AssemblyName), but this change only removes the ActiveIssue gate from several [BinderTest]s. I couldn't find any corresponding expectation updates in the BinderTracing tests, so please either include the expected-behavior adjustments in this PR or keep these tests behind ActiveIssue until the fix is present.
 [BinderTest(isolate: true, testSetup: nameof(LoadSubdirectoryAssembly_InstanceALC))]

src/tests/Loader/binding/tracing/BinderTracingTest.EventHandlers.cs:278

  • The inline comment says Emit-based Invoke causes an extra load, but the test is no longer gated by ActiveIssue. Rewording this to describe why additionalLoadsToTrack is present avoids implying the test is expected to fail.
 [BinderTest(isolate: true, additionalLoadsToTrack: new string[] { "AssemblyToLoadDependency" })] // Emit-based Invoke causes an extra load.
  • Files reviewed: 2/2 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@elinor-fungelinor-fung changed the title Update BinderTracing resolving callback expectationsRe-enable binder tracing tests disabled during reflection invoke workAug 13, 2026
@elinor-fung
elinor-fung marked this pull request as ready for review August 13, 2026 22:58
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
13 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@elinor-fung

Copy link
Copy Markdown
Member

/ba-g build analysis misclassifying known test failures - dotnet/arcade#17340

@elinor-fung
elinor-fung merged commit 92ea46b into mainAug 20, 2026
94 of 97 checks passed
@elinor-fung
elinor-fung deleted the copilot/update-bindertracingtest-assemblyloadcontextresolv branch August 20, 2026 17:28
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Update BinderTracingTest.AssemblyLoadContextResolving_ReturnNull to not assume reflection semantics

5 participants

@elinor-fung@jkoritzinsky@AaronRobinsonMSFT