File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
Tests/ServiceLifecycleTests Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -338,6 +338,7 @@ public actor ServiceGroup: Sendable {
338
338
group: & group,
339
339
gracefulShutdownManagers: gracefulShutdownManagers
340
340
)
341
+ return . failure( error)
341
342
} catch {
342
343
return . failure( error)
343
344
}
Original file line number Diff line number Diff line change @@ -433,7 +433,7 @@ final class ServiceGroupTests: XCTestCase {
433
433
]
434
434
)
435
435
436
- await withThrowingTaskGroup ( of: Void . self) { group in
436
+ try await withThrowingTaskGroup ( of: Void . self) { group in
437
437
group. addTask {
438
438
try await serviceGroup. run ( )
439
439
}
@@ -474,6 +474,10 @@ final class ServiceGroupTests: XCTestCase {
474
474
475
475
// Let's exit from the first service
476
476
await service1. resumeRunContinuation ( with: . success( ( ) ) )
477
+
478
+ try await XCTAsyncAssertThrowsError ( await group. next ( ) ) {
479
+ XCTAssertTrue ( $0 is ExampleError )
480
+ }
477
481
}
478
482
}
479
483
You can’t perform that action at this time.
0 commit comments