Make Akka client test more stable
We already have a hack to wait for client span to close after the request because it is closed on separate thread. This patch extends that hack to handle cases when original request throws an exception.
This commit is contained in:
parent
fc30badbee
commit
f5f3386f79
|
@ -23,8 +23,12 @@ class AkkaHttpClientInstrumentationTest extends HttpClientTest<AkkaHttpClientDec
|
|||
.withMethod(HttpMethods.lookup(method).get())
|
||||
.addHeaders(headers.collect { RawHeader.create(it.key, it.value) })
|
||||
|
||||
def response = Http.get(system).singleRequest(request, materializer).toCompletableFuture().get()
|
||||
def response
|
||||
try {
|
||||
response = Http.get(system).singleRequest(request, materializer).toCompletableFuture().get()
|
||||
} finally {
|
||||
blockUntilChildSpansFinished(1)
|
||||
}
|
||||
callback?.call()
|
||||
return response.status().intValue()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue