Skip to content

Conversation

medhatiwari
Copy link
Contributor

@medhatiwari medhatiwari commented Oct 12, 2025

Summary

Fixes the remaining 2 failing StackTraceHelper tests from #63927 by making tests runtime-agnostic instead of expecting exact string matches for runtime internals.

Problem

Tests were failing on Mono due to strict string matching against runtime-specific formatting:

  • Lambda methods: Expected "lambda_method34" but Mono shows "object.lambda_method34"
  • Async state machines: Expected resolved method names but Mono shows state machine internals

Solution

Updated tests to verify essential functionality while accepting different valid runtime behaviors:

  • Lambda test: Changed from Assert.StartsWith("lambda_method") to Assert.Contains("lambda_method")
  • Async test: Added flexible checks that accept both resolved method names and state machine forms

cc: @giritrivedi

@github-actions github-actions bot added the needs-area-label Used by the dotnet-issue-labeler to label those issues which couldn't be triaged automatically label Oct 12, 2025
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Oct 12, 2025
@ilonatommy ilonatommy added area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework and removed needs-area-label Used by the dotnet-issue-labeler to label those issues which couldn't be triaged automatically labels Oct 17, 2025
Copy link
Contributor

Hey @dotnet/aspnet-build, looks like this PR is something you want to take a look at.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants