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
Copy link
Contributor

Thanks for your PR, @@medhatiwari. Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

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

Labels

community-contribution Indicates that the PR has been added by a community member needs-area-label Used by the dotnet-issue-labeler to label those issues which couldn't be triaged automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant