aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core
diff options
context:
space:
mode:
Diffstat (limited to 'test/core')
-rw-r--r--test/core/end2end/bad_server_response_test.c12
-rw-r--r--test/core/end2end/tests/bad_ping.c1
-rw-r--r--test/core/end2end/tests/keepalive_timeout.c2
-rw-r--r--test/core/end2end/tests/max_connection_age.c3
-rw-r--r--test/core/end2end/tests/shutdown_finishes_calls.c4
-rw-r--r--test/core/transport/bdp_estimator_test.cc2
6 files changed, 11 insertions, 13 deletions
diff --git a/test/core/end2end/bad_server_response_test.c b/test/core/end2end/bad_server_response_test.c
index eeabc769d3..2070fa5b02 100644
--- a/test/core/end2end/bad_server_response_test.c
+++ b/test/core/end2end/bad_server_response_test.c
@@ -62,8 +62,6 @@
#define HTTP2_DETAIL_MSG(STATUS_CODE) \
"Received http2 header with status: " #STATUS_CODE
-#define UNPARSEABLE_DETAIL_MSG "Failed parsing HTTP/2"
-
#define HTTP1_DETAIL_MSG "Trying to connect an http1.x server"
/* TODO(zyc) Check the content of incomming data instead of using this length */
@@ -208,8 +206,10 @@ static void start_rpc(int target_port, grpc_status_code expected_status,
cq_verify(cqv);
GPR_ASSERT(status == expected_status);
- GPR_ASSERT(-1 != grpc_slice_slice(details, grpc_slice_from_static_string(
- expected_detail)));
+ if (expected_detail != NULL) {
+ GPR_ASSERT(-1 != grpc_slice_slice(details, grpc_slice_from_static_string(
+ expected_detail)));
+ }
grpc_metadata_array_destroy(&initial_metadata_recv);
grpc_metadata_array_destroy(&trailing_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_UNAVAILABLE, UNPARSEABLE_DETAIL_MSG);
+ 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/bad_ping.c b/test/core/end2end/tests/bad_ping.c
index d442f12480..34cc8e78cd 100644
--- a/test/core/end2end/tests/bad_ping.c
+++ b/test/core/end2end/tests/bad_ping.c
@@ -203,7 +203,6 @@ static void test_bad_ping(grpc_end2end_test_config config) {
// The connection should be closed immediately after the misbehaved pings,
// the in-progress RPC should fail.
GPR_ASSERT(status == GRPC_STATUS_UNAVAILABLE);
- GPR_ASSERT(0 == grpc_slice_str_cmp(details, "Endpoint read failed"));
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/end2end/tests/keepalive_timeout.c b/test/core/end2end/tests/keepalive_timeout.c
index c4280149c7..0053368ecc 100644
--- a/test/core/end2end/tests/keepalive_timeout.c
+++ b/test/core/end2end/tests/keepalive_timeout.c
@@ -193,7 +193,7 @@ static void test_keepalive_timeout(grpc_end2end_test_config config) {
char *details_str = grpc_slice_to_c_string(details);
char *method_str = grpc_slice_to_c_string(call_details.method);
- GPR_ASSERT(status == GRPC_STATUS_UNAVAILABLE);
+ GPR_ASSERT(status == GRPC_STATUS_INTERNAL);
GPR_ASSERT(0 == grpc_slice_str_cmp(details, "keepalive watchdog timeout"));
GPR_ASSERT(0 == grpc_slice_str_cmp(call_details.method, "/foo"));
validate_host_override_string("foo.test.google.fr:1234", call_details.host,
diff --git a/test/core/end2end/tests/max_connection_age.c b/test/core/end2end/tests/max_connection_age.c
index 4119087619..b6daa59d7b 100644
--- a/test/core/end2end/tests/max_connection_age.c
+++ b/test/core/end2end/tests/max_connection_age.c
@@ -203,8 +203,7 @@ static void test_max_age_forcibly_close(grpc_end2end_test_config config) {
/* The connection should be closed immediately after the max age grace period,
the in-progress RPC should fail. */
- GPR_ASSERT(status == GRPC_STATUS_UNAVAILABLE);
- GPR_ASSERT(0 == grpc_slice_str_cmp(details, "Endpoint read failed"));
+ GPR_ASSERT(status == GRPC_STATUS_INTERNAL);
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/end2end/tests/shutdown_finishes_calls.c b/test/core/end2end/tests/shutdown_finishes_calls.c
index cef571b490..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_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 80cc174258..7ac35016c0 100644
--- a/test/core/transport/bdp_estimator_test.cc
+++ b/test/core/transport/bdp_estimator_test.cc
@@ -60,12 +60,10 @@ void AddSamples(BdpEstimator *estimator, int64_t *samples, size_t n) {
estimator->AddIncomingBytes(1234567);
inc_time();
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- EXPECT_TRUE(estimator->NeedPing(&exec_ctx));
estimator->SchedulePing();
estimator->StartPing();
for (size_t i = 0; i < n; i++) {
estimator->AddIncomingBytes(samples[i]);
- EXPECT_FALSE(estimator->NeedPing(&exec_ctx));
}
gpr_sleep_until(gpr_time_add(gpr_now(GPR_CLOCK_REALTIME),
gpr_time_from_millis(1, GPR_TIMESPAN)));