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

Construct ResultsView directly to fix some flaky tests #1091

merged 1 commit into from Jun 20, 2019


Copy link

commented Jun 20, 2019

Fixes atom/atom#19480

Previously, all tests on the ResultsView actually ran a real search against the file system to populate their results. We're seeing intermittent failures in a few tests, so I decided to eliminate the async behavior by constructing a ResultsView directly with a model and then populating some fake results on the model. This makes the test synchronous and should hopefully eliminate the flakiness.

Avoid async code in flaky tests
Instead of running a fully-integrated test by searching the actual file 
system, I simply construct a ResultsView directly with some fake results 
and test its behaviors.

@nathansobo nathansobo merged commit 3c6a601 into master Jun 20, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed

@nathansobo nathansobo deleted the ns/fix-flakes branch Jun 20, 2019


This comment has been minimized.

Copy link

commented Jun 20, 2019

Nice work, @nathansobo! Do you think a similar approach would help with the ResultsView flake seen in atom/atom#19554?


This comment has been minimized.

Copy link
Contributor Author

commented Jun 28, 2019

Sorry I missed this question. I ended up making another pass in #1093 that keeps most of the tests async but removes some of the code that I think was causing flakiness.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.