Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix flaky test re: "changes the line endings in the buffer" 🤞 #57
We've seen a few instances of the CI failure described in atom/atom#17326, but I haven't been able to reproduce it locally.
Currently, the test changes the line ending for a file, then registers a change observer, and then waits for the change observer to be called. Since we aren't registering the change observer until after we change the line endings, I suspect that could lead to us waiting forever for our change observer to get called, thus leading to a failure like the timeout that we're seeing.
To make sure the observer gets called when the line endings change, this pull request registers the observer before changing the line endings, then changes the line endings, and then waits until the observer has been called.