Skip to content

Commit 19491c9

Browse files
committed
(Temporary) Remove unit test
1 parent 364f3dc commit 19491c9

File tree

1 file changed

+0
-89
lines changed

1 file changed

+0
-89
lines changed

Tests/SourceKitLSPTests/BackgroundIndexingTests.swift

Lines changed: 0 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -2625,95 +2625,6 @@ final class BackgroundIndexingTests: XCTestCase {
26252625
XCTAssertEqual(symbols?.count, 1)
26262626
}
26272627

2628-
// WIP, not ready for review
2629-
// func testBuildServerUsesCustomTaskBatchSize() async throws {
2630-
// final class BuildServer: CustomBuildServer {
2631-
// let inProgressRequestsTracker = CustomBuildServerInProgressRequestTracker()
2632-
// private let projectRoot: URL
2633-
// private var testFileURL: URL { projectRoot.appendingPathComponent("test.swift").standardized }
2634-
2635-
// nonisolated(unsafe) var preparedTargetBatches = [[BuildTargetIdentifier]]()
2636-
2637-
// required init(projectRoot: URL, connectionToSourceKitLSP: any LanguageServerProtocol.Connection) {
2638-
// self.projectRoot = projectRoot
2639-
// }
2640-
2641-
// func initializeBuildRequest(_ request: InitializeBuildRequest) async throws -> InitializeBuildResponse {
2642-
// return try initializationResponseSupportingBackgroundIndexing(
2643-
// projectRoot: projectRoot,
2644-
// outputPathsProvider: false,
2645-
// )
2646-
// }
2647-
2648-
// func buildTargetSourcesRequest(_ request: BuildTargetSourcesRequest) async throws -> BuildTargetSourcesResponse {
2649-
// var dummyTargets = [BuildTargetIdentifier]()
2650-
// for i in 0..<10 {
2651-
// dummyTargets.append(BuildTargetIdentifier(uri: try! URI(string: "dummy://dummy-\(i)")))
2652-
// }
2653-
// return BuildTargetSourcesResponse(items: dummyTargets.map {
2654-
// SourcesItem(target: $0, sources: [SourceItem(uri: URI(testFileURL), kind: .file, generated: false)])
2655-
// })
2656-
// }
2657-
2658-
// func textDocumentSourceKitOptionsRequest(
2659-
// _ request: TextDocumentSourceKitOptionsRequest
2660-
// ) async throws -> TextDocumentSourceKitOptionsResponse? {
2661-
// return TextDocumentSourceKitOptionsResponse(compilerArguments: [request.textDocument.uri.pseudoPath])
2662-
// }
2663-
2664-
// func prepareTarget(_ request: BuildTargetPrepareRequest) async throws -> VoidResponse {
2665-
// preparedTargetBatches.append(request.targets.sorted { $0.uri.stringValue < $1.uri.stringValue })
2666-
// return VoidResponse()
2667-
// }
2668-
// }
2669-
2670-
// let project = try await CustomBuildServerTestProject(
2671-
// files: [
2672-
// "test.swift": """
2673-
// func testFunction() {}
2674-
// """
2675-
// ],
2676-
// buildServer: BuildServer.self,
2677-
// enableBackgroundIndexing: true,
2678-
// )
2679-
2680-
// // Wait for indexing to finish without elevating the priority
2681-
// // Otherwise, task re-scheduling would cause the test to become flaky
2682-
// let semaphore = WrappedSemaphore(name: "Indexing finished")
2683-
// let testClient = project.testClient
2684-
// Task(priority: .low) {
2685-
// await assertNoThrow {
2686-
// try await testClient.send(SynchronizeRequest(index: true))
2687-
// }
2688-
// semaphore.signal()
2689-
// }
2690-
// try semaphore.waitOrThrow()
2691-
2692-
// let buildServer = try project.buildServer()
2693-
// let preparedBatches = buildServer.preparedTargetBatches.sorted { $0[0].uri.stringValue < $1[0].uri.stringValue }
2694-
// XCTAssertEqual(preparedBatches, [
2695-
// [
2696-
// BuildTargetIdentifier(uri: try! URI(string: "dummy://dummy-0")),
2697-
// BuildTargetIdentifier(uri: try! URI(string: "dummy://dummy-1")),
2698-
// BuildTargetIdentifier(uri: try! URI(string: "dummy://dummy-2")),
2699-
// ],
2700-
// [
2701-
// BuildTargetIdentifier(uri: try! URI(string: "dummy://dummy-3")),
2702-
// BuildTargetIdentifier(uri: try! URI(string: "dummy://dummy-4")),
2703-
// BuildTargetIdentifier(uri: try! URI(string: "dummy://dummy-5")),
2704-
// ],
2705-
// [
2706-
// BuildTargetIdentifier(uri: try! URI(string: "dummy://dummy-6")),
2707-
// BuildTargetIdentifier(uri: try! URI(string: "dummy://dummy-7")),
2708-
// BuildTargetIdentifier(uri: try! URI(string: "dummy://dummy-8")),
2709-
// ],
2710-
// [
2711-
// BuildTargetIdentifier(uri: try! URI(string: "dummy://dummy-9")),
2712-
// ]
2713-
// ])
2714-
// }
2715-
// }
2716-
27172628
extension HoverResponseContents {
27182629
var markupContent: MarkupContent? {
27192630
switch self {

0 commit comments

Comments
 (0)