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

Test to stress the verifier #2238

Draft
wants to merge 43 commits into
base: master
Choose a base branch
from
Draft

Test to stress the verifier #2238

wants to merge 43 commits into from

Conversation

MikaelMayer
Copy link
Member

Since I had a lot of failures using the language server, I found at least a very common denominator to (most) bugs: They happen when I trigger verification when another verification process is not finished.
But of course, if a previous verification process is canceled too early, it will get caught by try/catch in the parser and resolver. And if it's canceled late, it won't throw any TaskCanceledExceptions anywhere. Thus, these kinds of bugs require an "intermediate interrupting time", that was hard to find.

Hence, I created this test that does exactly this. On a (relatively slow to verify) example, I insert a typo, remove the typo and a failing assertion at the same time, and then reinsert the assertion.
I do so because our tests can loop indefinitely if diagnostics look like A B A and they are not awaited in A.

This is the test that was used to discover #2237

Fixing the language server means that this test should pass, even if we change maxTests to 20 instead of 5

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants