Skip to content

Commit 5e565c6

Browse files
committed
Ensure that edits have been processed before trying to observe them in a cross-file completion
rdar://161245127
1 parent 32e919c commit 5e565c6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Tests/SourceKitLSPTests/SwiftCompletionTests.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1434,6 +1434,9 @@ final class SwiftCompletionTests: XCTestCase {
14341434
)
14351435
)
14361436

1437+
// Synchronize to make sure that the edit to Second.swift has been processed since opening First.swift and the
1438+
// completion request do not have any dependencies on the edit of Second.swift.
1439+
try await project.testClient.send(SynchronizeRequest())
14371440
let (firstUri, firstPositions) = try project.openDocument("First.swift")
14381441
let completions = try await project.testClient.send(
14391442
CompletionRequest(textDocument: TextDocumentIdentifier(firstUri), position: firstPositions["1️⃣"])

0 commit comments

Comments
 (0)