From def4fa56321a4bcf3930f3f4fa766ba419297daa Mon Sep 17 00:00:00 2001 From: Mikko Karjalainen Date: Thu, 28 Nov 2019 12:38:58 +0000 Subject: [PATCH] Add clue to intermittently failing test assertion. --- .../com/hotels/styx/routing/HostProxySpec.kt | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/system-tests/ft-suite/src/test/kotlin/com/hotels/styx/routing/HostProxySpec.kt b/system-tests/ft-suite/src/test/kotlin/com/hotels/styx/routing/HostProxySpec.kt index f0b0ec228a..747fb469a7 100644 --- a/system-tests/ft-suite/src/test/kotlin/com/hotels/styx/routing/HostProxySpec.kt +++ b/system-tests/ft-suite/src/test/kotlin/com/hotels/styx/routing/HostProxySpec.kt @@ -41,6 +41,7 @@ import io.kotlintest.matchers.beGreaterThan import io.kotlintest.matchers.beLessThan import io.kotlintest.matchers.numerics.shouldBeInRange import io.kotlintest.matchers.types.shouldBeNull +import io.kotlintest.matchers.withClue import io.kotlintest.seconds import io.kotlintest.shouldBe import io.kotlintest.specs.FeatureSpec @@ -153,14 +154,17 @@ class HostProxySpec : FeatureSpec() { clientResponse.bodyAs(UTF_8) shouldBe "Hello - HTTP" } - testServer().metrics().let { - (it["connections.total-connections"]!!.get("count") as Int) shouldBeInRange 1..2 + withClue("Origin connections.total-connections") { + testServer().metrics().let { + (it["connections.total-connections"]!!.get("count") as Int) shouldBeInRange 1..2 + } } - styxServer().metrics().let { - (it["routing.objects.hostProxy.connectionspool.connection-attempts"]!!.get("value") as Int) shouldBeInRange 1..2 + withClue("Styx Server routing.objects.hostProxy.connectionspool.connection-attempts") { + styxServer().metrics().let { + (it["routing.objects.hostProxy.connectionspool.connection-attempts"]!!.get("value") as Int) shouldBeInRange 1..2 + } } - } scenario("Applies connection expiration settings") {