Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react-native adds flakiness to tests due to its async nature #11

Closed
talkol opened this issue Aug 3, 2016 · 1 comment
Closed

react-native adds flakiness to tests due to its async nature #11

talkol opened this issue Aug 3, 2016 · 1 comment

Comments

@talkol
Copy link

talkol commented Aug 3, 2016

the way to fix flakiness is to work on synchronization

EarlGrey synchronizes by waiting for the device to be idle:
https://github.com/google/EarlGrey/blob/master/docs/api.md#synchronization

we should probably add to EarlGrey the same ability to synchronize, but on RN instead:

  1. on the bridge (like EG waits for network to be idle, maybe we can wait for the bridge to cool down from pending tasks)
  2. on the JS event queue (since there are pending tasks, we should probably wait until they finish before moving forward)

this is not an easy research task

@talkol
Copy link
Author

talkol commented Oct 6, 2016

Research: https://github.com/wix/detox/blob/master/SYNC-RESEARCH.md
First sync mechanism commit: ef0ad93
Fixed sync mechanism commit: b950133
Tests to confirm sync mechanism is working: 0da043d

@LeoNatan is working on improved version of the sync mechanism for iOS but the existing one works nicely

@talkol talkol closed this as completed Oct 6, 2016
@wix wix locked and limited conversation to collaborators Jul 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants