diff options
author | Craig Tiller <ctiller@google.com> | 2017-10-17 09:07:48 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2017-10-17 09:07:48 -0700 |
commit | 71f0e5ecd101a3129c0d078717ac331503bf377e (patch) | |
tree | adfbeccf48a3b84c06cc5fd145a165ef45a59ca5 /test/core | |
parent | 37e61863e6ffdbd395bd0fee0daa984f88e21bae (diff) | |
parent | 48bed5ec63a3a2c78170d3e24530558c1c93d666 (diff) |
Merge branch 'pid++' of github.com:ctiller/grpc into pid++
Diffstat (limited to 'test/core')
-rw-r--r-- | test/core/end2end/bad_server_response_test.c | 8 | ||||
-rw-r--r-- | test/core/end2end/tests/shutdown_finishes_calls.c | 4 | ||||
-rw-r--r-- | test/core/transport/bdp_estimator_test.cc | 8 |
3 files changed, 12 insertions, 8 deletions
diff --git a/test/core/end2end/bad_server_response_test.c b/test/core/end2end/bad_server_response_test.c index 554d8aa45b..2070fa5b02 100644 --- a/test/core/end2end/bad_server_response_test.c +++ b/test/core/end2end/bad_server_response_test.c @@ -207,8 +207,8 @@ static void start_rpc(int target_port, grpc_status_code expected_status, GPR_ASSERT(status == expected_status); if (expected_detail != NULL) { - GPR_ASSERT(-1 != grpc_slice_slice(details, grpc_slice_from_static_string( - expected_detail))); + GPR_ASSERT(-1 != grpc_slice_slice(details, grpc_slice_from_static_string( + expected_detail))); } grpc_metadata_array_destroy(&initial_metadata_recv); @@ -330,8 +330,8 @@ int main(int argc, char **argv) { HTTP2_DETAIL_MSG(502)); /* unparseable response */ - run_test(UNPARSEABLE_RESP, sizeof(UNPARSEABLE_RESP) - 1, - GRPC_STATUS_UNKNOWN, NULL); + run_test(UNPARSEABLE_RESP, sizeof(UNPARSEABLE_RESP) - 1, GRPC_STATUS_UNKNOWN, + NULL); /* http1 response */ run_test(HTTP1_RESP, sizeof(HTTP1_RESP) - 1, GRPC_STATUS_UNAVAILABLE, diff --git a/test/core/end2end/tests/shutdown_finishes_calls.c b/test/core/end2end/tests/shutdown_finishes_calls.c index 652695cfcd..f90359f09a 100644 --- a/test/core/end2end/tests/shutdown_finishes_calls.c +++ b/test/core/end2end/tests/shutdown_finishes_calls.c @@ -159,7 +159,9 @@ static void test_early_server_shutdown_finishes_inflight_calls( grpc_server_destroy(f.server); - GPR_ASSERT(status == GRPC_STATUS_INTERNAL || status == GRPC_STATUS_UNAVAILABLE); + // new code should give INTERNAL, some older code will give UNAVAILABLE + GPR_ASSERT(status == GRPC_STATUS_INTERNAL || + status == GRPC_STATUS_UNAVAILABLE); GPR_ASSERT(0 == grpc_slice_str_cmp(call_details.method, "/foo")); validate_host_override_string("foo.test.google.fr:1234", call_details.host, config); diff --git a/test/core/transport/bdp_estimator_test.cc b/test/core/transport/bdp_estimator_test.cc index a4a86f5b51..a944762a88 100644 --- a/test/core/transport/bdp_estimator_test.cc +++ b/test/core/transport/bdp_estimator_test.cc @@ -37,9 +37,11 @@ namespace { int g_clock = 0; gpr_timespec fake_gpr_now(gpr_clock_type clock_type) { - return (gpr_timespec){ - .tv_sec = g_clock, .tv_nsec = 0, .clock_type = clock_type, - }; + gpr_timespec ts; + ts.tv_sec = g_clock; + ts.tv_nsec = 0; + ts.clock_type = clock_type; + return ts; } void inc_time(void) { g_clock += 30; } |