Skip to content

Commit

Permalink
Address missing renames in conformance tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jzbrooks committed Sep 29, 2023
1 parent bd49002 commit 0cfee73
Showing 1 changed file with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ class Conformance(
},
).getOrThrow()
val results = streamResults(stream.resultChannel())
assertThat(results.error).isNull()
assertThat(results.cause).isNull()
assertThat(results.code).isEqualTo(Code.OK)
assertThat(results.messages.map { it.payload.type }.toSet()).isEqualTo(setOf(PayloadType.COMPRESSABLE))
assertThat(results.messages.map { it.payload.body.size() }).isEqualTo(sizes)
Expand Down Expand Up @@ -211,7 +211,7 @@ class Conformance(
val results = streamResults(stream.resultChannel())
// We've already read all the messages
assertThat(results.messages).isEmpty()
assertThat(results.error).isNull()
assertThat(results.cause).isNull()
assertThat(results.code).isEqualTo(Code.OK)
stream.receiveClose()
}
Expand Down Expand Up @@ -329,9 +329,9 @@ class Conformance(
testServiceConnectClient.unaryCall(message) { response ->
assertThat(response.code).isEqualTo(Code.UNKNOWN)
response.failure { errorResponse ->
assertThat(errorResponse.error).isNotNull()
assertThat(errorResponse.cause).isNotNull()
assertThat(errorResponse.code).isEqualTo(Code.UNKNOWN)
assertThat(errorResponse.error.message).isEqualTo("test status message")
assertThat(errorResponse.cause.message).isEqualTo("test status message")
countDownLatch.countDown()
}
response.success {
Expand Down Expand Up @@ -392,7 +392,7 @@ class Conformance(
},
) { response ->
response.failure { errorResponse ->
val error = errorResponse.error
val error = errorResponse.cause
assertThat(error.code).isEqualTo(Code.UNKNOWN)
assertThat(response.code).isEqualTo(Code.UNKNOWN)
assertThat(error.message).isEqualTo(statusMessage)
Expand Down Expand Up @@ -461,7 +461,7 @@ class Conformance(
testServiceConnectClient.failUnaryCall(simpleRequest {}) { response ->
assertThat(response.code).isEqualTo(Code.RESOURCE_EXHAUSTED)
response.failure { errorResponse ->
val error = errorResponse.error
val error = errorResponse.cause
assertThat(error.code).isEqualTo(Code.RESOURCE_EXHAUSTED)
assertThat(error.message).isEqualTo("soirée 🎉")
val connectErrorDetails = error.unpackedDetails(ErrorDetail::class)
Expand Down Expand Up @@ -544,9 +544,9 @@ class Conformance(
val response = testServiceConnectClient.unaryCallBlocking(message).execute()
assertThat(response.code).isEqualTo(Code.UNKNOWN)
response.failure { errorResponse ->
assertThat(errorResponse.error).isNotNull()
assertThat(errorResponse.cause).isNotNull()
assertThat(errorResponse.code).isEqualTo(Code.UNKNOWN)
assertThat(errorResponse.error.message).isEqualTo("test status message")
assertThat(errorResponse.cause.message).isEqualTo("test status message")
}
response.success {
fail<Unit>("unexpected success")
Expand All @@ -566,7 +566,7 @@ class Conformance(
},
).execute()
response.failure { errorResponse ->
val error = errorResponse.error
val error = errorResponse.cause
assertThat(error.code).isEqualTo(Code.UNKNOWN)
assertThat(response.code).isEqualTo(Code.UNKNOWN)
assertThat(error.message).isEqualTo(statusMessage)
Expand Down Expand Up @@ -597,7 +597,7 @@ class Conformance(
val response = testServiceConnectClient.failUnaryCallBlocking(simpleRequest {}).execute()
assertThat(response.code).isEqualTo(Code.RESOURCE_EXHAUSTED)
response.failure { errorResponse ->
val error = errorResponse.error
val error = errorResponse.cause
assertThat(error.code).isEqualTo(Code.RESOURCE_EXHAUSTED)
assertThat(error.message).isEqualTo("soirée 🎉")
val connectErrorDetails = error.unpackedDetails(ErrorDetail::class)
Expand Down Expand Up @@ -692,9 +692,9 @@ class Conformance(
testServiceConnectClient.unaryCall(message) { response ->
assertThat(response.code).isEqualTo(Code.UNKNOWN)
response.failure { errorResponse ->
assertThat(errorResponse.error).isNotNull()
assertThat(errorResponse.cause).isNotNull()
assertThat(errorResponse.code).isEqualTo(Code.UNKNOWN)
assertThat(errorResponse.error.message).isEqualTo("test status message")
assertThat(errorResponse.cause.message).isEqualTo("test status message")
countDownLatch.countDown()
}
response.success {
Expand All @@ -720,7 +720,7 @@ class Conformance(
},
) { response ->
response.failure { errorResponse ->
val error = errorResponse.error
val error = errorResponse.cause
assertThat(error.code).isEqualTo(Code.UNKNOWN)
assertThat(response.code).isEqualTo(Code.UNKNOWN)
assertThat(error.message).isEqualTo(statusMessage)
Expand Down Expand Up @@ -766,7 +766,7 @@ class Conformance(
testServiceConnectClient.failUnaryCall(simpleRequest {}) { response ->
assertThat(response.code).isEqualTo(Code.RESOURCE_EXHAUSTED)
response.failure { errorResponse ->
val error = errorResponse.error
val error = errorResponse.cause
assertThat(error.code).isEqualTo(Code.RESOURCE_EXHAUSTED)
assertThat(error.message).isEqualTo("soirée 🎉")
val connectErrorDetails = error.unpackedDetails(ErrorDetail::class)
Expand Down Expand Up @@ -817,7 +817,7 @@ class Conformance(
val messages: List<Output>,
val code: Code,
val trailers: Trailers,
val error: Throwable?,
val cause: Throwable?,
)

/*
Expand Down

0 comments on commit 0cfee73

Please sign in to comment.