Skip to content

Commit

Permalink
refactor(rt): upstream HttpClientEngine interface changes (#608)
Browse files Browse the repository at this point in the history
* refactor(rt): upstream HttpClientEngine interface changes

* replace default retry middleware with AWS specific component that sets retry headers

* add max attempts to retry header
  • Loading branch information
aajtodd committed Feb 13, 2023
1 parent 95cc8f5 commit 6ec30de
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class AwsJsonProtocolTest {
@Test
fun testSetJsonProtocolHeaders() = runTest {
val mockEngine = object : HttpClientEngineBase("test") {
override suspend fun roundTrip(request: HttpRequest): HttpCall {
override suspend fun roundTrip(context: ExecutionContext, request: HttpRequest): HttpCall {
val resp = HttpResponse(HttpStatusCode.OK, Headers.Empty, HttpBody.Empty)
val now = Instant.now()
return HttpCall(request, resp, now, now)
Expand Down Expand Up @@ -58,7 +58,7 @@ class AwsJsonProtocolTest {
@Test
fun testEmptyBody() = runTest {
val mockEngine = object : HttpClientEngineBase("test") {
override suspend fun roundTrip(request: HttpRequest): HttpCall {
override suspend fun roundTrip(context: ExecutionContext, request: HttpRequest): HttpCall {
val resp = HttpResponse(HttpStatusCode.OK, Headers.Empty, HttpBody.Empty)
val now = Instant.now()
return HttpCall(request, resp, now, now)
Expand Down Expand Up @@ -86,7 +86,7 @@ class AwsJsonProtocolTest {
@Test
fun testDoesNotOverride() = runTest {
val mockEngine = object : HttpClientEngineBase("test") {
override suspend fun roundTrip(request: HttpRequest): HttpCall {
override suspend fun roundTrip(context: ExecutionContext, request: HttpRequest): HttpCall {
val resp = HttpResponse(HttpStatusCode.OK, Headers.Empty, HttpBody.Empty)
val now = Instant.now()
return HttpCall(request, resp, now, now)
Expand Down

0 comments on commit 6ec30de

Please sign in to comment.