Skip to content

Add instrumentation tests for FabricMountingManager view lifecycle (#56294)#56294

Closed
javache wants to merge 1 commit intofacebook:mainfrom
javache:export-D98935855
Closed

Add instrumentation tests for FabricMountingManager view lifecycle (#56294)#56294
javache wants to merge 1 commit intofacebook:mainfrom
javache:export-D98935855

Conversation

@javache
Copy link
Copy Markdown
Member

@javache javache commented Mar 31, 2026

Summary:

Add Android instrumentation tests that validate the Java-side and C++ registry
behavior around view preallocation, destruction, and recreation — the core
scenario fixed by D98729251.

Two layers of tests:

  1. Java-side tests (IntBufferBatchMountItem): Construct mount item int/obj
    buffers manually and execute against MountingManager. Validates CREATE→INSERT
    and Preallocate→Delete→CREATE→INSERT sequences through the Java mount system.

  2. Native registry tests (FabricMountingManagerTestHelper): JNI hybrid class
    that creates a real C++ FabricMountingManager and exercises the
    allocatedViewRegistry_ lifecycle. Validates that after preallocate + destroy,
    the tag is removed from the registry (the D98729251 fix), so executeMount
    would correctly emit a CREATE instruction.

The native test helper is built as a separate library (libfabricjni_test_helper.so)
under jni/react/fabric/test/, with friend access to FabricMountingManager internals.

Changelog: [Internal]

Reviewed By: Abbondanzo

Differential Revision: D98935855

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 31, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync bot commented Mar 31, 2026

@javache has exported this pull request. If you are a Meta employee, you can view the originating Diff in D98935855.

@meta-codesync meta-codesync bot changed the title Add instrumentation tests for FabricMountingManager view lifecycle Add instrumentation tests for FabricMountingManager view lifecycle (#56294) Apr 1, 2026
@javache javache force-pushed the export-D98935855 branch from d2a7e7f to c109e95 Compare April 1, 2026 10:39
javache added a commit to javache/react-native that referenced this pull request Apr 1, 2026
…acebook#56294)

Summary:

Add Android instrumentation tests that validate the Java-side and C++ registry
behavior around view preallocation, destruction, and recreation — the core
scenario fixed by D98729251.

Two layers of tests:

1. **Java-side tests** (IntBufferBatchMountItem): Construct mount item int/obj
   buffers manually and execute against MountingManager. Validates CREATE→INSERT
   and Preallocate→Delete→CREATE→INSERT sequences through the Java mount system.

2. **Native registry tests** (FabricMountingManagerTestHelper): JNI hybrid class
   that creates a real C++ FabricMountingManager and exercises the
   allocatedViewRegistry_ lifecycle. Validates that after preallocate + destroy,
   the tag is removed from the registry (the D98729251 fix), so executeMount
   would correctly emit a CREATE instruction.

The native test helper is built as a separate library (libfabricjni_test_helper.so)
under jni/react/fabric/test/, with friend access to FabricMountingManager internals.

Changelog: [Internal]

Differential Revision: D98935855
javache added a commit to javache/react-native that referenced this pull request Apr 1, 2026
…acebook#56294)

Summary:
Pull Request resolved: facebook#56294

Add Android instrumentation tests that validate the Java-side and C++ registry
behavior around view preallocation, destruction, and recreation — the core
scenario fixed by D98729251.

Two layers of tests:

1. **Java-side tests** (IntBufferBatchMountItem): Construct mount item int/obj
   buffers manually and execute against MountingManager. Validates CREATE→INSERT
   and Preallocate→Delete→CREATE→INSERT sequences through the Java mount system.

2. **Native registry tests** (FabricMountingManagerTestHelper): JNI hybrid class
   that creates a real C++ FabricMountingManager and exercises the
   allocatedViewRegistry_ lifecycle. Validates that after preallocate + destroy,
   the tag is removed from the registry (the D98729251 fix), so executeMount
   would correctly emit a CREATE instruction.

The native test helper is built as a separate library (libfabricjni_test_helper.so)
under jni/react/fabric/test/, with friend access to FabricMountingManager internals.

Changelog: [Internal]

Differential Revision: D98935855
@javache javache force-pushed the export-D98935855 branch 2 times, most recently from 43bf24a to 534d051 Compare April 2, 2026 10:53
javache added a commit to javache/react-native that referenced this pull request Apr 2, 2026
…acebook#56294)

Summary:

Add Android instrumentation tests that validate the Java-side and C++ registry
behavior around view preallocation, destruction, and recreation — the core
scenario fixed by D98729251.

Two layers of tests:

1. **Java-side tests** (IntBufferBatchMountItem): Construct mount item int/obj
   buffers manually and execute against MountingManager. Validates CREATE→INSERT
   and Preallocate→Delete→CREATE→INSERT sequences through the Java mount system.

2. **Native registry tests** (FabricMountingManagerTestHelper): JNI hybrid class
   that creates a real C++ FabricMountingManager and exercises the
   allocatedViewRegistry_ lifecycle. Validates that after preallocate + destroy,
   the tag is removed from the registry (the D98729251 fix), so executeMount
   would correctly emit a CREATE instruction.

The native test helper is built as a separate library (libfabricjni_test_helper.so)
under jni/react/fabric/test/, with friend access to FabricMountingManager internals.

Changelog: [Internal]

Differential Revision: D98935855
…acebook#56294)

Summary:

Add Android instrumentation tests that validate the Java-side and C++ registry
behavior around view preallocation, destruction, and recreation — the core
scenario fixed by D98729251.

Two layers of tests:

1. **Java-side tests** (IntBufferBatchMountItem): Construct mount item int/obj
   buffers manually and execute against MountingManager. Validates CREATE→INSERT
   and Preallocate→Delete→CREATE→INSERT sequences through the Java mount system.

2. **Native registry tests** (FabricMountingManagerTestHelper): JNI hybrid class
   that creates a real C++ FabricMountingManager and exercises the
   allocatedViewRegistry_ lifecycle. Validates that after preallocate + destroy,
   the tag is removed from the registry (the D98729251 fix), so executeMount
   would correctly emit a CREATE instruction.

The native test helper is built as a separate library (libfabricjni_test_helper.so)
under jni/react/fabric/test/, with friend access to FabricMountingManager internals.

Changelog: [Internal]

Reviewed By: Abbondanzo

Differential Revision: D98935855
@javache javache force-pushed the export-D98935855 branch from 534d051 to a929689 Compare April 7, 2026 10:33
@meta-codesync meta-codesync bot closed this in 37a1841 Apr 7, 2026
@facebook-github-tools facebook-github-tools bot added the Merged This PR has been merged. label Apr 7, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync bot commented Apr 7, 2026

This pull request has been merged in 37a1841.

@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @javache in 37a1841

When will my fix make it into a release? | How to file a pick request?

@javache javache deleted the export-D98935855 branch April 8, 2026 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants