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 a non-deterministic test failure #792

Merged

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Aug 4, 2023

We weren’t handling the notifications sent from the DidOpenTextDocumentNotification, which could cause test failures based on the notification timings relative to the notifications from the DidChangeTextDocumentNotification.

@ahoppen ahoppen requested a review from bnbarham August 4, 2023 02:23
@ahoppen ahoppen requested a review from benlangmuir as a code owner August 4, 2023 02:23
@ahoppen
Copy link
Member Author

ahoppen commented Aug 4, 2023

@swift-ci Please test


let didChangeTextDocumentExpectation = self.expectation(description: "didChangeTextDocument")
)), { (note: LanguageServerProtocol.Notification<PublishDiagnosticsNotification>) -> Void in
log("Received diagnsotics for open - syntactic")
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick:

Suggested change
log("Received diagnsotics for open - syntactic")
log("Received diagnostics for open - syntactic")

Same a couple lines down too

We weren’t handling the notifications sent from the `DidOpenTextDocumentNotification`, which could cause test failures based on the notification timings relative to the notifications from the `DidChangeTextDocumentNotification`.
@ahoppen ahoppen force-pushed the ahoppen/fix-non-deterministic-test-failure branch from 0b7cf3f to 6ad35c4 Compare August 30, 2023 17:21
@ahoppen
Copy link
Member Author

ahoppen commented Aug 30, 2023

@swift-ci Please test

@ahoppen
Copy link
Member Author

ahoppen commented Aug 31, 2023

@swift-ci Please test Linux

1 similar comment
@ahoppen
Copy link
Member Author

ahoppen commented Aug 31, 2023

@swift-ci Please test Linux

@ahoppen ahoppen merged commit 40d5f8f into swiftlang:main Aug 31, 2023
@ahoppen ahoppen deleted the ahoppen/fix-non-deterministic-test-failure branch August 31, 2023 21:34
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