Skip to content

[tests] Restore Java.Interop value manager coverage#12225

Merged
jonathanpeppers merged 1 commit into
mainfrom
jonathanpeppers-restore-java-interop-tests
Jul 24, 2026
Merged

[tests] Restore Java.Interop value manager coverage#12225
jonathanpeppers merged 1 commit into
mainfrom
jonathanpeppers-restore-java-interop-tests

Conversation

@jonathanpeppers

Copy link
Copy Markdown
Member

Pull Request
title and
description
should follow the
commit-messages.md workflow documentation, and in particular should include:

  • Useful description of why the change is necessary.
  • Links to issues fixed
  • Unit tests

Two Java.Interop test fixtures were unconditionally removed after CoreCLR became the default runtime, which also prevented tests compatible with CoreCLR from running.

Condition the removals on the implementations under test:

  • Run JniRuntimeJniValueManagerTests with the default typemap, while retaining its focused trimmable exclusion because ReflectionJniValueManager is unsupported there.
  • Compile AndroidValueManagerContractTests only for MonoVM because CoreCLR uses JavaMarshalValueManager and the trimmable path uses TrimmableTypeMapValueManager.

The trimmable limitation is tracked by #12221.

Validation:

  • Java.Interop host build
  • Focused host value-manager tests: 24 passed
  • CoreCLR default-typemap device suite: 1,001 total, 0 failed
  • CoreCLR trimmable device suite: 661 total, 0 failed

Condition the value manager test exclusions on the runtime and typemap implementations that cannot execute them.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 4892bbc2-de90-442c-b18d-984fd1b165d2
Copilot AI review requested due to automatic review settings July 23, 2026 22:05

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

Restores Java.Interop value manager test coverage by conditionally excluding fixtures based on the runtime/typemap under test, instead of disabling them unconditionally after CoreCLR became the default.

Changes:

  • Only compile AndroidValueManagerContractTests when UseMonoRuntime=true (MonoVM), since CoreCLR/NativeAOT use different value manager implementations.
  • Only exclude JniRuntime.JniValueManagerTests when using the trimmable typemap, where ReflectionJniValueManager is unsupported (#12221).

@jonathanpeppers jonathanpeppers added the ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable). label Jul 24, 2026
@jonathanpeppers
jonathanpeppers enabled auto-merge (squash) July 24, 2026 13:22
@jonathanpeppers
jonathanpeppers merged commit 76e7227 into main Jul 24, 2026
45 checks passed
@jonathanpeppers
jonathanpeppers deleted the jonathanpeppers-restore-java-interop-tests branch July 24, 2026 14:12
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.

3 participants