← Back to Kairo Docs|API Reference (Dokka)

healthCheck

suspend fun healthCheck(connectionFactory: ConnectionFactory)

Performs a health check by validating a connection from the pool, then closing it.

Detekt's SuspendFunSwallowedCancellation rule is suppressed because it raises false positives here. The catch (e: Throwable) block re-throws immediately, so CancellationException is not swallowed. The finally block's catch wraps a withContext(NonCancellable) block, so cancellation cannot occur during cleanup.