Files
Kohei Ota (inductor) c55297914e Fix flaky testRun_whenServiceThrows_andShutdownGracefully (#260)
## Motivation


[`testRun_whenServiceThrows_andShutdownGracefully`](https://github.com/swift-server/swift-service-lifecycle/blob/5e3b0e9/Tests/ServiceLifecycleTests/ServiceGroupTests.swift#L433-L441)
is flaky. It failed on the Swift 6.3 Linux job:
https://github.com/swift-server/swift-service-lifecycle/actions/runs/35197849503/job/105125249343

After service3 exits, the test pings service1 and expects `.runPing`
before `.shutdownGracefully`. But the service group sends the graceful
shutdown to service1 as soon as service3 exits, so the two events can
arrive in either order.

## Modifications

Wait for `.shutdownGracefully` on service1 before pinging it, like
`testRun_whenServiceThrows_andShutdownGracefully_andOtherServiceThrows`
already does.

## Result

The test no longer depends on the order of the two events.

`ServiceGroupTests` pass locally with Swift 6.3, and `swift format lint
--strict` passes.
2026-10-01 10:39:56 +00:00
..