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

Fix flaky workspace/symbol tests #1880

Merged
merged 2 commits into from
Nov 29, 2024
Merged

Fix flaky workspace/symbol tests #1880

merged 2 commits into from
Nov 29, 2024

Conversation

dbanck
Copy link
Member

@dbanck dbanck commented Nov 28, 2024

In the workspace/symbol tests, we'll send multiple didOpen requests for files in the same directory. The first request will trigger parsing of the whole directory (which is empty on disk) and set the module state to "loaded". The second didOpen will then do nothing, as it will respect the state already marked as loaded.

Depending on the order of execution, sometimes both files are opened before the first parsing job runs, sometimes the job runs between the two calls, causing the test to fail.

By writing the files to disk first, we ensure that both are parsed by the first didOpen call.

@dbanck dbanck requested a review from a team as a code owner November 28, 2024 16:31
Copy link
Member

@ansgarm ansgarm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find!

@ansgarm
Copy link
Member

ansgarm commented Nov 28, 2024

This flaky failure is unrelated I guess? 😄

image

@dbanck
Copy link
Member Author

dbanck commented Nov 28, 2024

This flaky failure is unrelated I guess? 😄

Yeah, I will look into that one next.

This PR is about
CleanShot 2024-11-28 at 21 11 45@2x

@dbanck dbanck merged commit 8218b06 into main Nov 29, 2024
21 of 22 checks passed
@dbanck dbanck deleted the b-fix-symbol-flakiness branch November 29, 2024 08:06
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants