Repository navigation
test: make order deterministic in LanguageServerTest - #1635
Merged
Merged
Conversation
testComputeFirst and testComputeAll expected server 0 to answer first because it slept 1 s and server 1 slept 2 s. LSP4E sends a request to a server only once that server has started and opened the document, so on a slow CI agent server 0 could receive the hover more than 1 s after server 1, and HoverContent1 arrived first. Let server 0 answer immediately and server 1 only once the test has the first result, so the order no longer depends on timing.
testComputeFirstSkipsEmptyResults/testComputeFirstTreatsEmptyListAsNull delayed the answer of server 1 by 2 s so that the empty answer of server 0 came first. Let server 1 answer once server 0 has answered instead, which keeps that order without the artificial fixed delay, and reduces the combined execution time almost 4 seconds.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.