Fix flaky ratpack http client test (#8881)
This commit is contained in:
parent
d701967f2d
commit
40938cf9e2
|
@ -86,8 +86,7 @@ class InstrumentedHttpClientTest extends Specification {
|
|||
}
|
||||
|
||||
app.test { httpClient ->
|
||||
"bar" == httpClient.get("foo").body.text
|
||||
}
|
||||
assert "bar" == httpClient.get("foo").body.text
|
||||
|
||||
new PollingConditions().eventually {
|
||||
def spanData = spanExporter.finishedSpanItems.find { it.name == "GET /foo" }
|
||||
|
@ -117,6 +116,7 @@ class InstrumentedHttpClientTest extends Specification {
|
|||
attsApi[HTTP_STATUS_CODE] == 200L
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def "add spans for multiple concurrent client calls"() {
|
||||
expect:
|
||||
|
@ -148,9 +148,8 @@ class InstrumentedHttpClientTest extends Specification {
|
|||
}
|
||||
|
||||
app.test { httpClient ->
|
||||
"hello" == httpClient.get("path-name").body.text
|
||||
assert "hello" == httpClient.get("path-name").body.text
|
||||
latch.await(1, TimeUnit.SECONDS)
|
||||
}
|
||||
|
||||
new PollingConditions().eventually {
|
||||
spanExporter.finishedSpanItems.size() == 3
|
||||
|
@ -182,6 +181,7 @@ class InstrumentedHttpClientTest extends Specification {
|
|||
attributes[HTTP_STATUS_CODE] == 200L
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def "handling exception errors in http client"() {
|
||||
expect:
|
||||
|
@ -214,7 +214,8 @@ class InstrumentedHttpClientTest extends Specification {
|
|||
}
|
||||
}
|
||||
|
||||
app.test { httpClient -> "error" == httpClient.get("path-name").body.text }
|
||||
app.test { httpClient ->
|
||||
assert "error" == httpClient.get("path-name").body.text
|
||||
|
||||
new PollingConditions().eventually {
|
||||
def spanData = spanExporter.finishedSpanItems.find { it.name == "GET /path-name" }
|
||||
|
@ -238,6 +239,7 @@ class InstrumentedHttpClientTest extends Specification {
|
|||
attributes[HTTP_STATUS_CODE] == 200L
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def "propagate http trace in ratpack services with compute thread"() {
|
||||
expect:
|
||||
|
|
Loading…
Reference in New Issue