Skip to content

Commit

Permalink
Merge pull request #2008 from ahoppen/testimplicitcancellation
Browse files Browse the repository at this point in the history
Make `testImplicitCancellationOnEdit` more robust
  • Loading branch information
ahoppen authored Feb 26, 2025
2 parents 85e0f96 + 9ceedcd commit 3e7f350
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Tests/SourceKitLSPTests/SemanticTokensTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -897,8 +897,9 @@ final class SemanticTokensTests: XCTestCase {
let testClient = try await TestSourceKitLSPClient(
hooks: Hooks(preHandleRequest: { request in
if request is DocumentSemanticTokensRequest {
// Sleep long enough for the edit to be handled
try? await Task.sleep(for: .seconds(10))
while !Task.isCancelled {
try? await Task.sleep(for: .seconds(1))
}
}
})
)
Expand Down

0 comments on commit 3e7f350

Please sign in to comment.