Android framework version
net11.0-android (Preview)
Affected platform version
.NET 11 Preview 7, forced unsupported MonoVM configuration
Description
Restoring the Android-specific AndroidValueManagerContractTests fixture on device exposes three incompatible inherited Java.Interop contract assertions:
AddPeer_NoDuplicates
ConstructPeer_ImplicitViaBindingConstructor_PeerIsInSurfacedPeers
ConstructPeer_ImplicitViaBindingMethod_PeerIsInSurfacedPeers
These tests assert exact changes in GetSurfacedPeers().Count. On Android, constructing the bound test peers also surfaces related framework wrappers, so the count grows by more than one even when the tested peer has only one mapping. Marking the fixture nonparallel does not change the result.
AndroidValueManager is only selected by MonoVM. CoreCLR uses JavaMarshalValueManager, while the trimmable/NativeAOT paths use their own value managers. MonoVM mobile targets are unsupported in .NET 11, so this fixture should not compile into supported .NET 11 test lanes.
Steps to Reproduce
- Include
tests/Mono.Android-Tests/Java.Interop-Tests/Java.InteropTests/AndroidValueManagerContractTests.cs.
- Force the unsupported MonoVM configuration with
UseMonoRuntime=true and _DisableCheckForUnsupportedMonoMobileRuntime=true.
- Build/install and run the
TrimmableTypeMapUnsupported category on device.
Did you find any workaround?
Keep the Android-specific fixture conditional on UseMonoRuntime=true. Supported CoreCLR and trimmable lanes exclude it because they do not instantiate AndroidValueManager.
Relevant log output
AddPeer_NoDuplicates: expected 2 surfaced peers, observed 3
ConstructPeer_ImplicitViaBindingConstructor_PeerIsInSurfacedPeers: expected 1, observed 2
ConstructPeer_ImplicitViaBindingMethod_PeerIsInSurfacedPeers: expected 0, observed 1
Android framework version
net11.0-android (Preview)
Affected platform version
.NET 11 Preview 7, forced unsupported MonoVM configuration
Description
Restoring the Android-specific
AndroidValueManagerContractTestsfixture on device exposes three incompatible inherited Java.Interop contract assertions:AddPeer_NoDuplicatesConstructPeer_ImplicitViaBindingConstructor_PeerIsInSurfacedPeersConstructPeer_ImplicitViaBindingMethod_PeerIsInSurfacedPeersThese tests assert exact changes in
GetSurfacedPeers().Count. On Android, constructing the bound test peers also surfaces related framework wrappers, so the count grows by more than one even when the tested peer has only one mapping. Marking the fixture nonparallel does not change the result.AndroidValueManageris only selected by MonoVM. CoreCLR usesJavaMarshalValueManager, while the trimmable/NativeAOT paths use their own value managers. MonoVM mobile targets are unsupported in .NET 11, so this fixture should not compile into supported .NET 11 test lanes.Steps to Reproduce
tests/Mono.Android-Tests/Java.Interop-Tests/Java.InteropTests/AndroidValueManagerContractTests.cs.UseMonoRuntime=trueand_DisableCheckForUnsupportedMonoMobileRuntime=true.TrimmableTypeMapUnsupportedcategory on device.Did you find any workaround?
Keep the Android-specific fixture conditional on
UseMonoRuntime=true. Supported CoreCLR and trimmable lanes exclude it because they do not instantiateAndroidValueManager.Relevant log output