Commit 4eaaf07 1 parent 7a8226c commit 4eaaf07 Copy full SHA for 4eaaf07
File tree 2 files changed +3
-3
lines changed
Tests/ServiceLifecycleTests
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ public actor ServiceGroup: Sendable {
102
102
/// Triggers the graceful shutdown of all services.
103
103
///
104
104
/// This method returns immediately after triggering the graceful shutdown and doesn't wait until the service have shutdown.
105
- public func shutdownGracefully ( ) async {
105
+ public func triggerGracefulShutdown ( ) async {
106
106
switch self . state {
107
107
case . initial:
108
108
// We aren't even running so we can stop right away.
Original file line number Diff line number Diff line change @@ -487,7 +487,7 @@ final class ServiceGroupTests: XCTestCase {
487
487
}
488
488
}
489
489
490
- func testShutdownGracefully ( ) async throws {
490
+ func testTriggerGracefulShutdown ( ) async throws {
491
491
let configuration = ServiceGroupConfiguration ( gracefulShutdownSignals: [ ] )
492
492
let service1 = MockService ( description: " Service1 " )
493
493
let service2 = MockService ( description: " Service2 " )
@@ -508,7 +508,7 @@ final class ServiceGroupTests: XCTestCase {
508
508
var eventIterator3 = service3. events. makeAsyncIterator ( )
509
509
await XCTAsyncAssertEqual ( await eventIterator3. next ( ) , . run)
510
510
511
- await serviceGroup. shutdownGracefully ( )
511
+ await serviceGroup. triggerGracefulShutdown ( )
512
512
513
513
// The last service should receive the shutdown signal first
514
514
await XCTAsyncAssertEqual ( await eventIterator3. next ( ) , . shutdownGracefully)
You can’t perform that action at this time.
0 commit comments