Skip to content

Commit 7d67ff8

Browse files
nomeguyCopilot
andauthored
Update Tests/CasbinTests/TestSupport.swift
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 1a701b5 commit 7d67ff8

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

Tests/CasbinTests/TestSupport.swift

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,17 @@ func shutdownThreadPoolAsync(_ pool: NIOThreadPool) async throws {
3939
// These initiate shutdown but return immediately without waiting for completion.
4040

4141
func shutdownEventLoopGroupInBackground(_ group: EventLoopGroup) {
42-
group.shutdownGracefully(queue: .global()) { _ in }
42+
group.shutdownGracefully(queue: .global()) { error in
43+
if let error = error {
44+
assertionFailure("EventLoopGroup shutdown failed in background: \(error)")
45+
}
46+
}
4347
}
4448

4549
func shutdownThreadPoolInBackground(_ pool: NIOThreadPool) {
46-
pool.shutdownGracefully(queue: .global()) { _ in }
50+
pool.shutdownGracefully(queue: .global()) { error in
51+
if let error = error {
52+
assertionFailure("NIOThreadPool shutdown failed in background: \(error)")
53+
}
54+
}
4755
}

0 commit comments

Comments
 (0)