@@ -34,7 +34,6 @@ struct LocalServerPoolCancellationTests {
3434 @Test ( " Cancelling one task should not affect other waiting tasks " )
3535 @available ( LambdaSwift 2 . 0 , * )
3636 func testCancellationOnlyAffectsOwnTask( ) async throws {
37- #if compiler(>=6.0)
3837 let pool = LambdaHTTPServer . Pool< TestItem> ( name: " Test Pool " )
3938
4039 let cancelledFlags = Mutex < [ Bool ] > ( [ false , false , false ] )
@@ -95,9 +94,6 @@ struct LocalServerPoolCancellationTests {
9594 _ = await task2. result
9695 _ = await task3. result
9796
98- #else
99- throw XCTSkip ( " This test requires Swift 6.0 or later " )
100- #endif
10197 }
10298
10399 /// Test concurrent invocations with one being cancelled
@@ -107,8 +103,6 @@ struct LocalServerPoolCancellationTests {
107103 @Test ( " Multiple concurrent invocations with one cancellation " )
108104 @available ( LambdaSwift 2 . 0 , * )
109105 func testConcurrentInvocationsWithCancellation( ) async throws {
110- #if compiler(>=6.0)
111-
112106 try await withThrowingTaskGroup ( of: Void . self) { group in
113107 // Timeout task
114108 group. addTask {
@@ -169,10 +163,6 @@ struct LocalServerPoolCancellationTests {
169163 try await group. next ( )
170164 group. cancelAll ( )
171165 }
172-
173- #else
174- throw XCTSkip ( " This test requires Swift 6.0 or later " )
175- #endif
176166 }
177167
178168 /// Test that FIFO mode doesn't have the same issue
@@ -181,7 +171,6 @@ struct LocalServerPoolCancellationTests {
181171 @Test ( " FIFO mode cancellation works correctly " )
182172 @available ( LambdaSwift 2 . 0 , * )
183173 func testFIFOModeCancellation( ) async throws {
184- #if compiler(>=6.0)
185174 let pool = LambdaHTTPServer . Pool< TestItem> ( name: " FIFO Test Pool " )
186175
187176 try await withThrowingTaskGroup ( of: Void . self) { group in
@@ -222,9 +211,6 @@ struct LocalServerPoolCancellationTests {
222211 try await group. next ( )
223212 group. cancelAll ( )
224213 }
225- #else
226- throw XCTSkip ( " This test requires Swift 6.0 or later " )
227- #endif
228214 }
229215}
230216
0 commit comments