microsoft / microsoft/react-native-windows
Fix Synchronization Issues in IntegrationTest Project
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 17.3k
- Forks
- 1.2k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 33
Description
#5943 added code for an integration test harness allowing us to run React Native's built-in integration tests against an MSRN app. These tests run in the context on the instances JavaScript engine, and communicate pass/fail/exception to native code running on the UI thread.
It's possible for the state the UI thread knows about to get out of sync with the state of the JS thread. This presents as:
- The JS thread throws an exception
- The UI thread fails the test, and starts another
- The JS thread does async work then throws another exception from the last test
We have tricks to wait for the JS thread to be idle, but this doesn't cover all cases (such as the async work case above). We instead should expose the underlying lifecycle events for reloading a root view, so we can let the UI thread know when a test component is loaded/unloaded.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing #5943 and the IntegrationTest harness described in this issue, focusing on how JavaScript and UI-thread state communicate during root-view reloads. Done means lifecycle events identify when a test component is loaded or unloaded, preventing asynchronous work from a prior test from affecting the next test's result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native
- Domain
- mobile-dev, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100