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

Hopefully fix flaky test failure #1186

Merged
merged 2 commits into from Dec 15, 2019
Merged

Hopefully fix flaky test failure #1186

merged 2 commits into from Dec 15, 2019

Conversation

@olafurpg
Copy link
Member

olafurpg commented Dec 15, 2019

Fixes #1182

Previously, a race condition could cause Metals to prompt the user twice to import build changes. The duplicate prompt could cause some test suites like PantsLspSuite to become flaky. Now, we synchronize on the method that prompts the user to ensure that we finish writing the digest notification status in the H2 database before sending the next prompt.

I'm not sure if this fixes the flaky test failure, but I struggle to see why the Pants build digest should be any more flaky than the other build tool digests.

@gabro
gabro approved these changes Dec 15, 2019
Copy link
Member

gabro left a comment

LGMT 👍

Previously, a race condiition could cause Metals to prompt the user
twice to import build changes. The duplicate prompt could cause some
test suites to become flaky. Now, we synchronize on the method that
prompts the user to ensure that we finish writing the digest
notification status in the H2 database before sending the next prompt.
@olafurpg

This comment has been minimized.

Copy link
Member Author

olafurpg commented Dec 15, 2019

Let's give this a try and see if the issue is fixed.

@olafurpg olafurpg merged commit abca870 into scalameta:master Dec 15, 2019
11 checks passed
11 checks passed
ubuntu-latest unit tests
Details
windows-latest unit tests
Details
macOS-latest unit tests
Details
Sbt integration
Details
Maven integration
Details
Gradle integration
Details
Mill integration
Details
Pants integration
Details
LSP integration tests
Details
Scala cross tests
Details
Scalafmt/Scalafix/Docs
Details
@olafurpg olafurpg deleted the olafurpg:pants-flaky branch Dec 15, 2019
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.