Skip to content

Add basic test for NetworkReporter and CDP Network domain - #54049

Closed
motiz88 wants to merge 2 commits into
react:mainfrom
motiz88:export-D83746505
Closed

Add basic test for NetworkReporter and CDP Network domain#54049
motiz88 wants to merge 2 commits into
react:mainfrom
motiz88:export-D83746505

Conversation

@motiz88

Copy link
Copy Markdown
Contributor

Summary:
Changelog: [Internal]

Adds JsiIntegrationTest-based tests for the C++ layer responsible for handling the CDP Network domain. The tests use NetworkReporter to mimic the behaviour of a React Native platform that is generating network events.

NOTE: There are significant problems with the NetworkReporter / NetworkHandler singleton design: cross-Host and cross-Instance data pollution/corruption, inability to inspect multiple Hosts at once, inconsistency between the singleton's state and the CDP session's state, etc. The singletons similarly lack any kind of mechanism for test isolation (e.g. methods for clearing state between tests). As we iteratively fix these problems, the tests will require updating.

Differential Revision: D83746505

Summary:
TSIA
Changelog: [Internal]
Differential Revision: D83825727
Summary:
Changelog: [Internal]
Adds `JsiIntegrationTest`-based tests for the C++ layer responsible for handling the CDP `Network` domain. The tests use `NetworkReporter` to mimic the behaviour of a React Native platform that is generating network events.
NOTE: There are **significant problems** with the `NetworkReporter` / `NetworkHandler` singleton design: cross-Host and cross-Instance data pollution/corruption, inability to inspect multiple Hosts at once, inconsistency between the singleton's state and the CDP session's state, etc. The singletons similarly lack any kind of mechanism for test isolation (e.g. methods for clearing state between tests). As we iteratively fix these problems, the tests will require updating.
Differential Revision: D83746505
@meta-clameta-claBot 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 Oct 3, 2025
@meta-codesync

Copy link
Copy Markdown

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

@facebook-github-botfacebook-github-bot added the Merged This PR has been merged. label Oct 3, 2025
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request has been merged in fc60030.

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

Labels

CLA SignedThis label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.fb-exportedMergedThis PR has been merged.meta-exportedp: FacebookPartner: FacebookPartner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@motiz88@facebook-github-bot