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
merged 1 commit into from Jun 20, 2019

Conversation

@nathansobo
Copy link
Contributor

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
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

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

@jasonrudolph

This comment has been minimized.

Copy link
Member

commented Jun 20, 2019

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

@nathansobo

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
Projects
None yet
2 participants
You can’t perform that action at this time.