microsoft / microsoft/react-native-windows

Fix Synchronization Issues in IntegrationTest Project

Open
#5,963 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area: Test Infrastructure bug Workstream: Test Coverage
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:

  1. The JS thread throws an exception
  2. The UI thread fails the test, and starts another
  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.