The bridge's app-liveness tests decide on real time and fail intermittently
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 72/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- node.js, react-native, typescript
- Ambito
- testing
Direzione di ricerca
Start with packages/bridge/src/__tests__/app-liveness.test.ts and trace how its real-time failedWithin(ms) races the liveness monitor against sleep(ms). Check how the monitor receives its clock and whether the test can control it while keeping the real bridge and WebSocket setup. Done when the liveness cases decide from the configured budgets and the intermittent timing failures are addressed.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
packages/bridge/src/__tests__/app-liveness.test.ts runs the liveness monitor on real timers with budgets tens of milliseconds apart (an idle budget of 150 ms, a file-load budget of 300 ms) and decides each case by racing the monitor's verdict against a real timer: failedWithin(ms) is Promise.race([outcome, sleep(ms)]). When the event loop runs late, a timer meant to land between two budgets lands past one of them, and a case fails although the monitor behaved as specified. On main the file fails about one run in thirty, in different cases:
FAIL src/__tests__/app-liveness.test.ts > app liveness > gives loading a test file the file-load budget
AssertionError: expected false to be true // Object.is equality
FAIL src/__tests__/app-liveness.test.ts > app liveness > fails a blocked JS thread after the idle budget, naming the phase
AssertionError: expected false to be true // Object.is equality
so it can fail any PR's test job. The file pairs a real bridge and client over a real WebSocket, so a clock the test controls, handed to the monitor, would let each case decide on the budgets alone.
System Info
System:
OS: Linux 6.18 Ubuntu 24.04.5 LTS (WSL 2)
CPU: 32 cores
Binaries:
Node: 23.11.1
pnpm: 10.6.1
React Native Harness Version
1.6.0 (main at 81ed195)
Reproduction
Steps to reproduce
pnpm install, then build the packages:pnpm nx run-many -t build.- In
packages/bridge, run the file thirty times:for i in $(seq 30); do npx vitest run src/__tests__/app-liveness.test.ts; done. One of my thirty runs failed, in the first case above; with every core of the machine kept busy, one of ten failed, in the second.
Expected: every run passes, each case decided by the monitor's budgets alone, however late the event loop runs.
Actual: about one run in thirty fails, with the assertions above, and one in ten while the machine is busy. app-liveness.test.ts is unchanged on main at 26b67ea434.
- Lingua principale
- TypeScript
- Stelle
- 335
- Fork
- 23
- Merge medio
- 1g 8h
- PR unite (30g)
- 54
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di callstackincubator/react-native-harness
-
On Windows, `report.test.ts`'s unwritable-folder case creates `\dev\null\nope` at the drive root instead of meeting an unwritable folderForse già presa @TheSeydiCharyyev l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
callstackincubator/react-native-harness#301 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
callstackincubator/react-native-harness#296 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
callstackincubator/react-native-harness#128 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 58/100
callstackincubator/react-native-harness#303 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
callstackincubator/react-native-harness#300 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di callstackincubator/react-native-harness
Issue simili
-
Parallel reticle_verify opens per-flow leases without the source lease's ignoreHTTPSErrorsForse già presa @as992949791 l’ha presa oggi. Apertagood first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
reticlehq/reticle#2033 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
area:quality p3-medium ready-for-agent type:docs
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
fderuiter/deruiter.dev#3589 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
manfredsteyer/angular-oauth2-oidc#1514 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
marmelab/react-admin#11431 ·
I maintainer di solito rispondono entro 1 giorno