Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add clue to intermittently failing test assertion. #543

Merged
merged 1 commit into from
Nov 29, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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") {
Expand Down