mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 01:07:18 +03:00
Improve akka http metrics tests (#15534)
Removes possible flakiness. With chunked data, if the request is not executed, the request data might not be processed, and its size not recorded. CHANGELOG_BEGIN CHANGELOG_END
This commit is contained in:
parent
da0f63d3f2
commit
fb1c7e7c66
@ -257,6 +257,7 @@ class AkkaHttpMetricsSpec extends AnyWordSpec with Matchers with ScalatestRouteT
|
||||
Source(List(byteString1, byteString2)),
|
||||
),
|
||||
) ~> route ~> check {
|
||||
responseAs[String] // force processing the request
|
||||
metrics.httpRequestsBytesTotalValue should be(byteString1Size + byteString2Size)
|
||||
}
|
||||
}
|
||||
@ -315,7 +316,9 @@ class AkkaHttpMetricsSpec extends AnyWordSpec with Matchers with ScalatestRouteT
|
||||
ContentTypes.`application/octet-stream`,
|
||||
Source(List(byteString1, byteString2)),
|
||||
),
|
||||
) ~> route
|
||||
) ~> route ~> check {
|
||||
responseAs[String] // force processing the request
|
||||
}
|
||||
Get(
|
||||
"/exception",
|
||||
HttpEntity.Strict(ContentTypes.`application/octet-stream`, byteString1),
|
||||
|
Loading…
Reference in New Issue
Block a user