Skip to content

[tests] Disable flaky TryFindClass UTF-8 gref test#12032

Open
simonrozsival wants to merge 4 commits into
mainfrom
dev/simonrozsival/disable-flaky-tryfindclass-utf8-grefs
Open

[tests] Disable flaky TryFindClass UTF-8 gref test#12032
simonrozsival wants to merge 4 commits into
mainfrom
dev/simonrozsival/disable-flaky-tryfindclass-utf8-grefs

Conversation

@simonrozsival

@simonrozsival simonrozsival commented Jul 9, 2026

Copy link
Copy Markdown
Member

Temporarily ignores TryFindClass_Utf8_DoesNotLeakGlobalRefs, which is failing frequently in CI.

Tracking issue: #12031

Current hypothesis: this test is not a reliable exact leak assertion on Android because the runtime gref count is process-wide. NUnit test execution is serialized (NumberOfTestWorkers=0), but unrelated runtime/test-infrastructure work can still allocate persistent grefs on other threads while the assertion is running. The linked issue tracks finding a better way to test memory/reference leaks.

Example failure: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1498907&view=results

Temporarily ignore TryFindClass_Utf8_DoesNotLeakGlobalRefs while the frequent CI failure is tracked in #12031.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 9, 2026 12:41

Copilot AI 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.

Pull request overview

Temporarily disables a flaky Java.Interop UTF-8 TryFindClass global-reference leak test to reduce CI noise while the underlying issue is investigated (#12031).

Changes:

  • Adds an NUnit [Ignore] attribute to TryFindClass_Utf8_DoesNotLeakGlobalRefs.
Show a summary per file
File Description
external/Java.Interop/tests/Java.Interop-Tests/Java.Interop/JniTypeUtf8Test.cs Marks the flaky TryFindClass_Utf8_DoesNotLeakGlobalRefs test as ignored with a tracking link.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 1

Warm up the failed TryFindClass fallback path before measuring global reference counts so the assertion does not include one-time runtime caches.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@simonrozsival simonrozsival changed the title [tests] Disable flaky TryFindClass UTF-8 gref test [tests] Avoid first-use gref noise in TryFindClass tests Jul 9, 2026
simonrozsival and others added 2 commits July 9, 2026 15:03
Android's global reference count is process-wide, so exact equality can fail when unrelated runtime or test infrastructure work allocates persistent refs during the assertion. Repeat failed TryFindClass calls and allow bounded Android noise so per-call leaks are still amplified.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Disable the flaky UTF-8 TryFindClass gref assertion again while the tracking issue investigates a more reliable way to test JNI reference leaks.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@simonrozsival simonrozsival changed the title [tests] Avoid first-use gref noise in TryFindClass tests [tests] Disable flaky TryFindClass UTF-8 gref test Jul 9, 2026
@simonrozsival simonrozsival added the ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable). label Jul 9, 2026
@simonrozsival simonrozsival enabled auto-merge (squash) July 10, 2026 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants