Skip to content

Commit 6ec9026

Browse files
committed
Close bad test client after use.
1 parent 9e8dd34 commit 6ec9026

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/test/scala/com/twitter/finagle/postgres/integration/IntegrationSpec.scala

+6-2
Original file line numberDiff line numberDiff line change
@@ -429,8 +429,12 @@ class IntegrationSpec extends Spec {
429429
}
430430
"client is bad" in {
431431
val badClient: PostgresClient = getBadClient
432-
badClient.isAvailable must equal(false)
433-
Set(Status.Busy, Status.Closed) must contain (badClient.status)
432+
try {
433+
badClient.isAvailable must equal(false)
434+
Set(Status.Busy, Status.Closed) must contain (badClient.status)
435+
} finally {
436+
badClient.close()
437+
}
434438
}
435439
"client is closed" in {
436440
val client: PostgresClient = getClient

0 commit comments

Comments
 (0)