diff options
author | Craig Tiller <ctiller@google.com> | 2017-10-10 20:45:32 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2017-10-10 20:45:32 -0700 |
commit | 35c10cb6da8ea388e7c58ec833c205ff301f0f31 (patch) | |
tree | 0aabe45328086967b416802406515c50b53c3181 /test/core/transport/status_conversion_test.c | |
parent | db78c2fa3b753f84940ff4fea0e7627b8779413e (diff) | |
parent | fb607b34db35fee6b245cb1d61a1e863539e7534 (diff) |
Merge github.com:grpc/grpc into no-pollers-for-you
Diffstat (limited to 'test/core/transport/status_conversion_test.c')
-rw-r--r-- | test/core/transport/status_conversion_test.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/test/core/transport/status_conversion_test.c b/test/core/transport/status_conversion_test.c index 89558964c1..de8fa4458a 100644 --- a/test/core/transport/status_conversion_test.c +++ b/test/core/transport/status_conversion_test.c @@ -22,8 +22,13 @@ #define GRPC_STATUS_TO_HTTP2_ERROR(a, b) \ GPR_ASSERT(grpc_status_to_http2_error(a) == (b)) -#define HTTP2_ERROR_TO_GRPC_STATUS(a, deadline, b) \ - GPR_ASSERT(grpc_http2_error_to_grpc_status(a, deadline) == (b)) +#define HTTP2_ERROR_TO_GRPC_STATUS(a, deadline, b) \ + do { \ + grpc_exec_ctx my_exec_ctx = GRPC_EXEC_CTX_INIT; \ + GPR_ASSERT(grpc_http2_error_to_grpc_status(&my_exec_ctx, a, deadline) == \ + (b)); \ + grpc_exec_ctx_finish(&my_exec_ctx); \ + } while (0) #define GRPC_STATUS_TO_HTTP2_STATUS(a, b) \ GPR_ASSERT(grpc_status_to_http2_status(a) == (b)) #define HTTP2_STATUS_TO_GRPC_STATUS(a, b) \ @@ -79,7 +84,7 @@ int main(int argc, char **argv) { GRPC_STATUS_TO_HTTP2_STATUS(GRPC_STATUS_UNAVAILABLE, 200); GRPC_STATUS_TO_HTTP2_STATUS(GRPC_STATUS_DATA_LOSS, 200); - const gpr_timespec before_deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC); + const grpc_millis before_deadline = GRPC_MILLIS_INF_FUTURE; HTTP2_ERROR_TO_GRPC_STATUS(GRPC_HTTP2_NO_ERROR, before_deadline, GRPC_STATUS_INTERNAL); HTTP2_ERROR_TO_GRPC_STATUS(GRPC_HTTP2_PROTOCOL_ERROR, before_deadline, @@ -107,7 +112,7 @@ int main(int argc, char **argv) { HTTP2_ERROR_TO_GRPC_STATUS(GRPC_HTTP2_INADEQUATE_SECURITY, before_deadline, GRPC_STATUS_PERMISSION_DENIED); - const gpr_timespec after_deadline = gpr_inf_past(GPR_CLOCK_MONOTONIC); + const grpc_millis after_deadline = 0; HTTP2_ERROR_TO_GRPC_STATUS(GRPC_HTTP2_NO_ERROR, after_deadline, GRPC_STATUS_INTERNAL); HTTP2_ERROR_TO_GRPC_STATUS(GRPC_HTTP2_PROTOCOL_ERROR, after_deadline, |