aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/end2end
diff options
context:
space:
mode:
Diffstat (limited to 'test/core/end2end')
-rw-r--r--test/core/end2end/bad_server_response_test.c2
-rw-r--r--test/core/end2end/connection_refused_test.c2
-rw-r--r--test/core/end2end/dualstack_socket_test.c4
-rw-r--r--test/core/end2end/fixtures/h2_ssl_cert.c2
-rw-r--r--test/core/end2end/fixtures/http_proxy_fixture.c52
-rw-r--r--test/core/end2end/fixtures/proxy.c4
-rw-r--r--test/core/end2end/fuzzers/api_fuzzer.c2
-rw-r--r--test/core/end2end/fuzzers/api_fuzzer_corpus/clusterfuzz-testcase-6462055064272896bin0 -> 51 bytes
-rw-r--r--test/core/end2end/fuzzers/api_fuzzer_corpus/clusterfuzz-testcase-minimized-5175380371570688bin0 -> 48 bytes
-rw-r--r--test/core/end2end/fuzzers/client_fuzzer.c2
-rw-r--r--test/core/end2end/fuzzers/server_fuzzer.c2
-rwxr-xr-xtest/core/end2end/gen_build_yaml.py66
-rw-r--r--test/core/end2end/goaway_server_test.c8
-rw-r--r--test/core/end2end/invalid_call_argument_test.c4
-rw-r--r--test/core/end2end/no_server_test.c2
-rw-r--r--test/core/end2end/tests/authority_not_supported.c2
-rw-r--r--test/core/end2end/tests/bad_hostname.c2
-rw-r--r--test/core/end2end/tests/bad_ping.c4
-rw-r--r--test/core/end2end/tests/binary_metadata.c4
-rw-r--r--test/core/end2end/tests/call_creds.c6
-rw-r--r--test/core/end2end/tests/cancel_after_accept.c4
-rw-r--r--test/core/end2end/tests/cancel_after_client_done.c4
-rw-r--r--test/core/end2end/tests/cancel_after_invoke.c11
-rw-r--r--test/core/end2end/tests/cancel_before_invoke.c2
-rw-r--r--test/core/end2end/tests/cancel_in_a_vacuum.c2
-rw-r--r--test/core/end2end/tests/cancel_with_status.c2
-rw-r--r--test/core/end2end/tests/compressed_payload.c8
-rw-r--r--test/core/end2end/tests/default_host.c4
-rw-r--r--test/core/end2end/tests/disappearing_server.c4
-rw-r--r--test/core/end2end/tests/empty_batch.c2
-rw-r--r--test/core/end2end/tests/filter_call_init_fails.c8
-rw-r--r--test/core/end2end/tests/filter_causes_close.c2
-rw-r--r--test/core/end2end/tests/filter_latency.c4
-rw-r--r--test/core/end2end/tests/graceful_server_shutdown.c4
-rw-r--r--test/core/end2end/tests/high_initial_seqno.c4
-rw-r--r--test/core/end2end/tests/hpack_size.c4
-rw-r--r--test/core/end2end/tests/idempotent_request.c4
-rw-r--r--test/core/end2end/tests/invoke_large_request.c4
-rw-r--r--test/core/end2end/tests/keepalive_timeout.c4
-rw-r--r--test/core/end2end/tests/large_metadata.c4
-rw-r--r--test/core/end2end/tests/load_reporting_hook.c4
-rw-r--r--test/core/end2end/tests/max_concurrent_streams.c26
-rw-r--r--test/core/end2end/tests/max_connection_age.c8
-rw-r--r--test/core/end2end/tests/max_connection_idle.c4
-rw-r--r--test/core/end2end/tests/max_message_length.c8
-rw-r--r--test/core/end2end/tests/negative_deadline.c2
-rw-r--r--test/core/end2end/tests/network_status_change.c4
-rw-r--r--test/core/end2end/tests/no_logging.c4
-rw-r--r--test/core/end2end/tests/payload.c4
-rw-r--r--test/core/end2end/tests/ping_pong_streaming.c4
-rw-r--r--test/core/end2end/tests/registered_call.c4
-rw-r--r--test/core/end2end/tests/request_with_flags.c2
-rw-r--r--test/core/end2end/tests/request_with_payload.c4
-rw-r--r--test/core/end2end/tests/resource_quota_server.c12
-rw-r--r--test/core/end2end/tests/server_finishes_request.c4
-rw-r--r--test/core/end2end/tests/shutdown_finishes_calls.c4
-rw-r--r--test/core/end2end/tests/simple_cacheable_request.c4
-rw-r--r--test/core/end2end/tests/simple_delayed_request.c4
-rw-r--r--test/core/end2end/tests/simple_metadata.c4
-rw-r--r--test/core/end2end/tests/simple_request.c4
-rw-r--r--test/core/end2end/tests/streaming_error_response.c4
-rw-r--r--test/core/end2end/tests/trailing_metadata.c4
-rw-r--r--test/core/end2end/tests/write_buffering.c4
-rw-r--r--test/core/end2end/tests/write_buffering_at_end.c4
64 files changed, 207 insertions, 178 deletions
diff --git a/test/core/end2end/bad_server_response_test.c b/test/core/end2end/bad_server_response_test.c
index 1537caf943..fe7e674d17 100644
--- a/test/core/end2end/bad_server_response_test.c
+++ b/test/core/end2end/bad_server_response_test.c
@@ -236,7 +236,7 @@ static void cleanup_rpc(grpc_exec_ctx *exec_ctx) {
grpc_event ev;
grpc_slice_buffer_destroy_internal(exec_ctx, &state.temp_incoming_buffer);
grpc_slice_buffer_destroy_internal(exec_ctx, &state.outgoing_buffer);
- grpc_call_destroy(state.call);
+ grpc_call_unref(state.call);
grpc_completion_queue_shutdown(state.cq);
do {
ev = grpc_completion_queue_next(state.cq, n_sec_deadline(1), NULL);
diff --git a/test/core/end2end/connection_refused_test.c b/test/core/end2end/connection_refused_test.c
index 7fecadbb86..db7a6c0a8e 100644
--- a/test/core/end2end/connection_refused_test.c
+++ b/test/core/end2end/connection_refused_test.c
@@ -138,7 +138,7 @@ static void run_test(bool wait_for_ready, bool use_service_config) {
.type != GRPC_QUEUE_SHUTDOWN)
;
grpc_completion_queue_destroy(cq);
- grpc_call_destroy(call);
+ grpc_call_unref(call);
grpc_channel_destroy(chan);
cq_verifier_destroy(cqv);
diff --git a/test/core/end2end/dualstack_socket_test.c b/test/core/end2end/dualstack_socket_test.c
index c61ea6d260..caf7828691 100644
--- a/test/core/end2end/dualstack_socket_test.c
+++ b/test/core/end2end/dualstack_socket_test.c
@@ -243,7 +243,7 @@ void test_connect(const char *server_host, const char *client_host, int port,
grpc_slice_str_cmp(call_details.host, "foo.test.google.fr"));
GPR_ASSERT(was_cancelled == 1);
- grpc_call_destroy(s);
+ grpc_call_unref(s);
} else {
/* Check for a failed connection. */
CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
@@ -252,7 +252,7 @@ void test_connect(const char *server_host, const char *client_host, int port,
GPR_ASSERT(status == GRPC_STATUS_UNAVAILABLE);
}
- grpc_call_destroy(c);
+ grpc_call_unref(c);
cq_verifier_destroy(cqv);
diff --git a/test/core/end2end/fixtures/h2_ssl_cert.c b/test/core/end2end/fixtures/h2_ssl_cert.c
index 7aa0e16bf6..ba3956e8e3 100644
--- a/test/core/end2end/fixtures/h2_ssl_cert.c
+++ b/test/core/end2end/fixtures/h2_ssl_cert.c
@@ -343,7 +343,7 @@ static void simple_request_body(grpc_end2end_test_fixture f,
CQ_EXPECT_COMPLETION(cqv, tag(1), expected_result == SUCCESS);
cq_verify(cqv);
- grpc_call_destroy(c);
+ grpc_call_unref(c);
cq_verifier_destroy(cqv);
}
diff --git a/test/core/end2end/fixtures/http_proxy_fixture.c b/test/core/end2end/fixtures/http_proxy_fixture.c
index 451ed268d3..f0d09487c6 100644
--- a/test/core/end2end/fixtures/http_proxy_fixture.c
+++ b/test/core/end2end/fixtures/http_proxy_fixture.c
@@ -59,6 +59,7 @@
#include "src/core/lib/iomgr/sockaddr_utils.h"
#include "src/core/lib/iomgr/tcp_client.h"
#include "src/core/lib/iomgr/tcp_server.h"
+#include "src/core/lib/iomgr/timer.h"
#include "src/core/lib/slice/slice_internal.h"
#include "test/core/util/port.h"
@@ -69,7 +70,7 @@ struct grpc_end2end_http_proxy {
grpc_channel_args* channel_args;
gpr_mu* mu;
grpc_pollset* pollset;
- gpr_atm shutdown;
+ gpr_refcount users;
};
//
@@ -77,6 +78,8 @@ struct grpc_end2end_http_proxy {
//
typedef struct proxy_connection {
+ grpc_end2end_http_proxy* proxy;
+
grpc_endpoint* client_endpoint;
grpc_endpoint* server_endpoint;
@@ -103,13 +106,20 @@ typedef struct proxy_connection {
grpc_http_request http_request;
} proxy_connection;
+static void proxy_connection_ref(proxy_connection* conn, const char* reason) {
+ gpr_ref(&conn->refcount);
+}
+
// Helper function to destroy the proxy connection.
static void proxy_connection_unref(grpc_exec_ctx* exec_ctx,
- proxy_connection* conn) {
+ proxy_connection* conn, const char* reason) {
if (gpr_unref(&conn->refcount)) {
+ gpr_log(GPR_DEBUG, "endpoints: %p %p", conn->client_endpoint,
+ conn->server_endpoint);
grpc_endpoint_destroy(exec_ctx, conn->client_endpoint);
- if (conn->server_endpoint != NULL)
+ if (conn->server_endpoint != NULL) {
grpc_endpoint_destroy(exec_ctx, conn->server_endpoint);
+ }
grpc_pollset_set_destroy(exec_ctx, conn->pollset_set);
grpc_slice_buffer_destroy_internal(exec_ctx, &conn->client_read_buffer);
grpc_slice_buffer_destroy_internal(exec_ctx,
@@ -121,6 +131,7 @@ static void proxy_connection_unref(grpc_exec_ctx* exec_ctx,
grpc_slice_buffer_destroy_internal(exec_ctx, &conn->server_write_buffer);
grpc_http_parser_destroy(&conn->http_parser);
grpc_http_request_destroy(&conn->http_request);
+ gpr_unref(&conn->proxy->users);
gpr_free(conn);
}
}
@@ -139,7 +150,7 @@ static void proxy_connection_failed(grpc_exec_ctx* exec_ctx,
grpc_endpoint_shutdown(exec_ctx, conn->server_endpoint,
GRPC_ERROR_REF(error));
}
- proxy_connection_unref(exec_ctx, conn);
+ proxy_connection_unref(exec_ctx, conn, "conn_failed");
}
// Callback for writing proxy data to the client.
@@ -163,7 +174,7 @@ static void on_client_write_done(grpc_exec_ctx* exec_ctx, void* arg,
&conn->on_client_write_done);
} else {
// No more writes. Unref the connection.
- proxy_connection_unref(exec_ctx, conn);
+ proxy_connection_unref(exec_ctx, conn, "write_done");
}
}
@@ -188,7 +199,7 @@ static void on_server_write_done(grpc_exec_ctx* exec_ctx, void* arg,
&conn->on_server_write_done);
} else {
// No more writes. Unref the connection.
- proxy_connection_unref(exec_ctx, conn);
+ proxy_connection_unref(exec_ctx, conn, "server_write");
}
}
@@ -214,7 +225,7 @@ static void on_client_read_done(grpc_exec_ctx* exec_ctx, void* arg,
} else {
grpc_slice_buffer_move_into(&conn->client_read_buffer,
&conn->server_write_buffer);
- gpr_ref(&conn->refcount);
+ proxy_connection_ref(conn, "client_read");
grpc_endpoint_write(exec_ctx, conn->server_endpoint,
&conn->server_write_buffer,
&conn->on_server_write_done);
@@ -246,7 +257,7 @@ static void on_server_read_done(grpc_exec_ctx* exec_ctx, void* arg,
} else {
grpc_slice_buffer_move_into(&conn->server_read_buffer,
&conn->client_write_buffer);
- gpr_ref(&conn->refcount);
+ proxy_connection_ref(conn, "server_read");
grpc_endpoint_write(exec_ctx, conn->client_endpoint,
&conn->client_write_buffer,
&conn->on_client_write_done);
@@ -270,7 +281,9 @@ static void on_write_response_done(grpc_exec_ctx* exec_ctx, void* arg,
// Start reading from both client and server. One of the read
// requests inherits our ref to conn, but we need to take a new ref
// for the other one.
- gpr_ref(&conn->refcount);
+ proxy_connection_ref(conn, "client_read");
+ proxy_connection_ref(conn, "server_read");
+ proxy_connection_unref(exec_ctx, conn, "write_response");
grpc_endpoint_read(exec_ctx, conn->client_endpoint, &conn->client_read_buffer,
&conn->on_client_read_done);
grpc_endpoint_read(exec_ctx, conn->server_endpoint, &conn->server_read_buffer,
@@ -312,6 +325,8 @@ static void on_server_connect_done(grpc_exec_ctx* exec_ctx, void* arg,
static void on_read_request_done(grpc_exec_ctx* exec_ctx, void* arg,
grpc_error* error) {
proxy_connection* conn = arg;
+ gpr_log(GPR_DEBUG, "on_read_request_done: %p %s", conn,
+ grpc_error_string(error));
if (error != GRPC_ERROR_NONE) {
proxy_connection_failed(exec_ctx, conn, true /* is_client */,
"HTTP proxy read request", error);
@@ -376,12 +391,14 @@ static void on_accept(grpc_exec_ctx* exec_ctx, void* arg,
gpr_free(acceptor);
grpc_end2end_http_proxy* proxy = arg;
// Instantiate proxy_connection.
- proxy_connection* conn = gpr_malloc(sizeof(*conn));
- memset(conn, 0, sizeof(*conn));
+ proxy_connection* conn = gpr_zalloc(sizeof(*conn));
+ gpr_ref(&proxy->users);
conn->client_endpoint = endpoint;
+ conn->proxy = proxy;
gpr_ref_init(&conn->refcount, 1);
conn->pollset_set = grpc_pollset_set_create();
grpc_pollset_set_add_pollset(exec_ctx, conn->pollset_set, proxy->pollset);
+ grpc_endpoint_add_to_pollset_set(exec_ctx, endpoint, conn->pollset_set);
grpc_closure_init(&conn->on_read_request_done, on_read_request_done, conn,
grpc_schedule_on_exec_ctx);
grpc_closure_init(&conn->on_server_connect_done, on_server_connect_done, conn,
@@ -416,6 +433,7 @@ static void thread_main(void* arg) {
grpc_end2end_http_proxy* proxy = arg;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
do {
+ gpr_ref(&proxy->users);
const gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC);
const gpr_timespec deadline =
gpr_time_add(now, gpr_time_from_seconds(1, GPR_TIMESPAN));
@@ -426,7 +444,7 @@ static void thread_main(void* arg) {
grpc_pollset_work(&exec_ctx, proxy->pollset, &worker, now, deadline));
gpr_mu_unlock(proxy->mu);
grpc_exec_ctx_flush(&exec_ctx);
- } while (!gpr_atm_acq_load(&proxy->shutdown));
+ } while (!gpr_unref(&proxy->users));
grpc_exec_ctx_finish(&exec_ctx);
}
@@ -434,6 +452,7 @@ grpc_end2end_http_proxy* grpc_end2end_http_proxy_create(void) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_end2end_http_proxy* proxy = gpr_malloc(sizeof(*proxy));
memset(proxy, 0, sizeof(*proxy));
+ gpr_ref_init(&proxy->users, 1);
// Construct proxy address.
const int proxy_port = grpc_pick_unused_port_or_die();
gpr_join_host_port(&proxy->proxy_name, "localhost", proxy_port);
@@ -474,17 +493,16 @@ static void destroy_pollset(grpc_exec_ctx* exec_ctx, void* arg,
}
void grpc_end2end_http_proxy_destroy(grpc_end2end_http_proxy* proxy) {
- gpr_atm_rel_store(&proxy->shutdown, 1); // Signal proxy thread to shutdown.
+ gpr_unref(&proxy->users); // Signal proxy thread to shutdown.
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
gpr_thd_join(proxy->thd);
grpc_tcp_server_shutdown_listeners(&exec_ctx, proxy->server);
grpc_tcp_server_unref(&exec_ctx, proxy->server);
gpr_free(proxy->proxy_name);
grpc_channel_args_destroy(&exec_ctx, proxy->channel_args);
- grpc_closure destroyed;
- grpc_closure_init(&destroyed, destroy_pollset, proxy->pollset,
- grpc_schedule_on_exec_ctx);
- grpc_pollset_shutdown(&exec_ctx, proxy->pollset, &destroyed);
+ grpc_pollset_shutdown(&exec_ctx, proxy->pollset,
+ grpc_closure_create(destroy_pollset, proxy->pollset,
+ grpc_schedule_on_exec_ctx));
gpr_free(proxy);
grpc_exec_ctx_finish(&exec_ctx);
}
diff --git a/test/core/end2end/fixtures/proxy.c b/test/core/end2end/fixtures/proxy.c
index b8b1e5c6c9..d660073ce6 100644
--- a/test/core/end2end/fixtures/proxy.c
+++ b/test/core/end2end/fixtures/proxy.c
@@ -148,8 +148,8 @@ void grpc_end2end_proxy_destroy(grpc_end2end_proxy *proxy) {
static void unrefpc(proxy_call *pc, const char *reason) {
if (gpr_unref(&pc->refs)) {
- grpc_call_destroy(pc->c2p);
- grpc_call_destroy(pc->p2s);
+ grpc_call_unref(pc->c2p);
+ grpc_call_unref(pc->p2s);
grpc_metadata_array_destroy(&pc->c2p_initial_metadata);
grpc_metadata_array_destroy(&pc->p2s_initial_metadata);
grpc_metadata_array_destroy(&pc->p2s_trailing_metadata);
diff --git a/test/core/end2end/fuzzers/api_fuzzer.c b/test/core/end2end/fuzzers/api_fuzzer.c
index 83c82ba5c0..88a0e301da 100644
--- a/test/core/end2end/fuzzers/api_fuzzer.c
+++ b/test/core/end2end/fuzzers/api_fuzzer.c
@@ -661,7 +661,7 @@ static void read_metadata(input_stream *inp, size_t *count,
}
static call_state *destroy_call(call_state *call) {
- grpc_call_destroy(call->call);
+ grpc_call_unref(call->call);
call->call = NULL;
return maybe_delete_call_state(call);
}
diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/clusterfuzz-testcase-6462055064272896 b/test/core/end2end/fuzzers/api_fuzzer_corpus/clusterfuzz-testcase-6462055064272896
new file mode 100644
index 0000000000..c121283242
--- /dev/null
+++ b/test/core/end2end/fuzzers/api_fuzzer_corpus/clusterfuzz-testcase-6462055064272896
Binary files differ
diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/clusterfuzz-testcase-minimized-5175380371570688 b/test/core/end2end/fuzzers/api_fuzzer_corpus/clusterfuzz-testcase-minimized-5175380371570688
new file mode 100644
index 0000000000..9c7aebc63a
--- /dev/null
+++ b/test/core/end2end/fuzzers/api_fuzzer_corpus/clusterfuzz-testcase-minimized-5175380371570688
Binary files differ
diff --git a/test/core/end2end/fuzzers/client_fuzzer.c b/test/core/end2end/fuzzers/client_fuzzer.c
index bc322e45a3..6f49baffd2 100644
--- a/test/core/end2end/fuzzers/client_fuzzer.c
+++ b/test/core/end2end/fuzzers/client_fuzzer.c
@@ -151,7 +151,7 @@ done:
ev = grpc_completion_queue_next(cq, gpr_inf_past(GPR_CLOCK_REALTIME), NULL);
GPR_ASSERT(ev.type == GRPC_QUEUE_SHUTDOWN);
}
- grpc_call_destroy(call);
+ grpc_call_unref(call);
grpc_completion_queue_destroy(cq);
grpc_metadata_array_destroy(&initial_metadata_recv);
grpc_metadata_array_destroy(&trailing_metadata_recv);
diff --git a/test/core/end2end/fuzzers/server_fuzzer.c b/test/core/end2end/fuzzers/server_fuzzer.c
index 97b436cdf9..6d65fe1847 100644
--- a/test/core/end2end/fuzzers/server_fuzzer.c
+++ b/test/core/end2end/fuzzers/server_fuzzer.c
@@ -109,7 +109,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
}
done:
- if (call1 != NULL) grpc_call_destroy(call1);
+ if (call1 != NULL) grpc_call_unref(call1);
grpc_call_details_destroy(&call_details1);
grpc_metadata_array_destroy(&request_metadata1);
grpc_server_shutdown_and_notify(server, cq, tag(0xdead));
diff --git a/test/core/end2end/gen_build_yaml.py b/test/core/end2end/gen_build_yaml.py
index d1e510d636..48e5720539 100755
--- a/test/core/end2end/gen_build_yaml.py
+++ b/test/core/end2end/gen_build_yaml.py
@@ -39,9 +39,9 @@ import hashlib
FixtureOptions = collections.namedtuple(
'FixtureOptions',
- 'fullstack includes_proxy dns_resolver secure platforms ci_mac tracing exclude_configs exclude_iomgrs large_writes')
+ 'fullstack includes_proxy dns_resolver secure platforms ci_mac tracing exclude_configs exclude_iomgrs large_writes enables_compression')
default_unsecure_fixture_options = FixtureOptions(
- True, False, True, False, ['windows', 'linux', 'mac', 'posix'], True, False, [], [], True)
+ True, False, True, False, ['windows', 'linux', 'mac', 'posix'], True, False, [], [], True, False)
socketpair_unsecure_fixture_options = default_unsecure_fixture_options._replace(fullstack=False, dns_resolver=False)
default_secure_fixture_options = default_unsecure_fixture_options._replace(secure=True)
uds_fixture_options = default_unsecure_fixture_options._replace(dns_resolver=False, platforms=['linux', 'mac', 'posix'], exclude_iomgrs=['uv'])
@@ -51,8 +51,7 @@ fd_unsecure_fixture_options = default_unsecure_fixture_options._replace(
# maps fixture name to whether it requires the security library
END2END_FIXTURES = {
- 'h2_compress': default_unsecure_fixture_options,
-
+ 'h2_compress': default_unsecure_fixture_options._replace(enables_compression=True),
'h2_census': default_unsecure_fixture_options,
'h2_load_reporting': default_unsecure_fixture_options,
'h2_fakesec': default_secure_fixture_options._replace(ci_mac=False),
@@ -83,8 +82,8 @@ END2END_FIXTURES = {
TestOptions = collections.namedtuple(
'TestOptions',
- 'needs_fullstack needs_dns proxyable secure traceable cpu_cost exclude_iomgrs large_writes flaky')
-default_test_options = TestOptions(False, False, True, False, True, 1.0, [], False, False)
+ 'needs_fullstack needs_dns proxyable secure traceable cpu_cost exclude_iomgrs large_writes flaky allow_compression')
+default_test_options = TestOptions(False, False, True, False, True, 1.0, [], False, False, True)
connectivity_test_options = default_test_options._replace(needs_fullstack=True)
LOWCPU = 0.1
@@ -94,12 +93,13 @@ END2END_TESTS = {
'authority_not_supported': default_test_options,
'bad_hostname': default_test_options,
'bad_ping': connectivity_test_options._replace(proxyable=False),
- 'binary_metadata': default_test_options,
+ 'binary_metadata': default_test_options._replace(cpu_cost=LOWCPU),
'resource_quota_server': default_test_options._replace(large_writes=True,
- proxyable=False),
+ proxyable=False,
+ allow_compression=False),
'call_creds': default_test_options._replace(secure=True),
'cancel_after_accept': default_test_options._replace(cpu_cost=LOWCPU),
- 'cancel_after_client_done': default_test_options,
+ 'cancel_after_client_done': default_test_options._replace(cpu_cost=LOWCPU),
'cancel_after_invoke': default_test_options._replace(cpu_cost=LOWCPU),
'cancel_before_invoke': default_test_options._replace(cpu_cost=LOWCPU),
'cancel_in_a_vacuum': default_test_options._replace(cpu_cost=LOWCPU),
@@ -110,46 +110,49 @@ END2END_TESTS = {
'default_host': default_test_options._replace(needs_fullstack=True,
needs_dns=True),
'disappearing_server': connectivity_test_options._replace(flaky=True),
- 'empty_batch': default_test_options,
- 'filter_causes_close': default_test_options,
+ 'empty_batch': default_test_options._replace(cpu_cost=LOWCPU),
+ 'filter_causes_close': default_test_options._replace(cpu_cost=LOWCPU),
'filter_call_init_fails': default_test_options,
- 'filter_latency': default_test_options,
+ 'filter_latency': default_test_options._replace(cpu_cost=LOWCPU),
'graceful_server_shutdown': default_test_options._replace(cpu_cost=LOWCPU),
'hpack_size': default_test_options._replace(proxyable=False,
- traceable=False),
- 'high_initial_seqno': default_test_options,
+ traceable=False,
+ cpu_cost=LOWCPU),
+ 'high_initial_seqno': default_test_options._replace(cpu_cost=LOWCPU),
'idempotent_request': default_test_options,
'invoke_large_request': default_test_options,
- 'keepalive_timeout': default_test_options._replace(proxyable=False),
+ 'keepalive_timeout': default_test_options._replace(proxyable=False,
+ cpu_cost=LOWCPU),
'large_metadata': default_test_options,
- 'max_concurrent_streams': default_test_options._replace(proxyable=False),
- 'max_connection_age': default_test_options,
+ 'max_concurrent_streams': default_test_options._replace(
+ proxyable=False, cpu_cost=LOWCPU),
+ 'max_connection_age': default_test_options._replace(cpu_cost=LOWCPU),
'max_connection_idle': connectivity_test_options._replace(
- proxyable=False, exclude_iomgrs=['uv']),
- 'max_message_length': default_test_options,
+ proxyable=False, exclude_iomgrs=['uv'], cpu_cost=LOWCPU),
+ 'max_message_length': default_test_options._replace(cpu_cost=LOWCPU),
'negative_deadline': default_test_options,
- 'network_status_change': default_test_options,
+ 'network_status_change': default_test_options._replace(cpu_cost=LOWCPU),
'no_logging': default_test_options._replace(traceable=False),
'no_op': default_test_options,
'payload': default_test_options,
'load_reporting_hook': default_test_options,
- 'ping_pong_streaming': default_test_options,
- 'ping': connectivity_test_options._replace(proxyable=False),
+ 'ping_pong_streaming': default_test_options._replace(cpu_cost=LOWCPU),
+ 'ping': connectivity_test_options._replace(proxyable=False, cpu_cost=LOWCPU),
'registered_call': default_test_options,
'request_with_flags': default_test_options._replace(
proxyable=False, cpu_cost=LOWCPU),
- 'request_with_payload': default_test_options,
- 'server_finishes_request': default_test_options,
- 'shutdown_finishes_calls': default_test_options,
- 'shutdown_finishes_tags': default_test_options,
- 'simple_cacheable_request': default_test_options,
+ 'request_with_payload': default_test_options._replace(cpu_cost=LOWCPU),
+ 'server_finishes_request': default_test_options._replace(cpu_cost=LOWCPU),
+ 'shutdown_finishes_calls': default_test_options._replace(cpu_cost=LOWCPU),
+ 'shutdown_finishes_tags': default_test_options._replace(cpu_cost=LOWCPU),
+ 'simple_cacheable_request': default_test_options._replace(cpu_cost=LOWCPU),
'simple_delayed_request': connectivity_test_options,
'simple_metadata': default_test_options,
'simple_request': default_test_options,
- 'streaming_error_response': default_test_options,
+ 'streaming_error_response': default_test_options._replace(cpu_cost=LOWCPU),
'trailing_metadata': default_test_options,
- 'write_buffering': default_test_options,
- 'write_buffering_at_end': default_test_options,
+ 'write_buffering': default_test_options._replace(cpu_cost=LOWCPU),
+ 'write_buffering_at_end': default_test_options._replace(cpu_cost=LOWCPU),
}
@@ -169,6 +172,9 @@ def compatible(f, t):
if END2END_TESTS[t].large_writes:
if not END2END_FIXTURES[f].large_writes:
return False
+ if not END2END_TESTS[t].allow_compression:
+ if END2END_FIXTURES[f].enables_compression:
+ return False
return True
diff --git a/test/core/end2end/goaway_server_test.c b/test/core/end2end/goaway_server_test.c
index a028fb7f5c..ababdb70a8 100644
--- a/test/core/end2end/goaway_server_test.c
+++ b/test/core/end2end/goaway_server_test.c
@@ -302,10 +302,10 @@ int main(int argc, char **argv) {
CQ_EXPECT_COMPLETION(cqv, tag(0xdead2), 1);
cq_verify(cqv);
- grpc_call_destroy(call1);
- grpc_call_destroy(call2);
- grpc_call_destroy(server_call1);
- grpc_call_destroy(server_call2);
+ grpc_call_unref(call1);
+ grpc_call_unref(call2);
+ grpc_call_unref(server_call1);
+ grpc_call_unref(server_call2);
grpc_server_destroy(server1);
grpc_server_destroy(server2);
grpc_channel_destroy(chan);
diff --git a/test/core/end2end/invalid_call_argument_test.c b/test/core/end2end/invalid_call_argument_test.c
index e89e59767f..e9a31f278c 100644
--- a/test/core/end2end/invalid_call_argument_test.c
+++ b/test/core/end2end/invalid_call_argument_test.c
@@ -126,7 +126,7 @@ static void prepare_test(int is_client) {
static void cleanup_test() {
grpc_completion_queue *shutdown_cq;
- grpc_call_destroy(g_state.call);
+ grpc_call_unref(g_state.call);
cq_verifier_destroy(g_state.cqv);
grpc_channel_destroy(g_state.chan);
grpc_slice_unref(g_state.details);
@@ -135,7 +135,7 @@ static void cleanup_test() {
if (!g_state.is_client) {
shutdown_cq = grpc_completion_queue_create_for_pluck(NULL);
- grpc_call_destroy(g_state.server_call);
+ grpc_call_unref(g_state.server_call);
grpc_server_shutdown_and_notify(g_state.server, shutdown_cq, tag(1000));
GPR_ASSERT(grpc_completion_queue_pluck(shutdown_cq, tag(1000),
grpc_timeout_seconds_to_deadline(5),
diff --git a/test/core/end2end/no_server_test.c b/test/core/end2end/no_server_test.c
index dd18b0c692..a479d5c868 100644
--- a/test/core/end2end/no_server_test.c
+++ b/test/core/end2end/no_server_test.c
@@ -97,7 +97,7 @@ int main(int argc, char **argv) {
.type != GRPC_QUEUE_SHUTDOWN)
;
grpc_completion_queue_destroy(cq);
- grpc_call_destroy(call);
+ grpc_call_unref(call);
grpc_channel_destroy(chan);
cq_verifier_destroy(cqv);
diff --git a/test/core/end2end/tests/authority_not_supported.c b/test/core/end2end/tests/authority_not_supported.c
index f9298f1fa7..13cda08617 100644
--- a/test/core/end2end/tests/authority_not_supported.c
+++ b/test/core/end2end/tests/authority_not_supported.c
@@ -182,7 +182,7 @@ static void test_with_authority_header(grpc_end2end_test_config config) {
grpc_metadata_array_destroy(&initial_metadata_recv);
grpc_metadata_array_destroy(&trailing_metadata_recv);
- grpc_call_destroy(c);
+ grpc_call_unref(c);
cq_verifier_destroy(cqv);
diff --git a/test/core/end2end/tests/bad_hostname.c b/test/core/end2end/tests/bad_hostname.c
index 72a44d0de5..35a531cf78 100644
--- a/test/core/end2end/tests/bad_hostname.c
+++ b/test/core/end2end/tests/bad_hostname.c
@@ -163,7 +163,7 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
grpc_metadata_array_destroy(&request_metadata_recv);
grpc_call_details_destroy(&call_details);
- grpc_call_destroy(c);
+ grpc_call_unref(c);
cq_verifier_destroy(cqv);
}
diff --git a/test/core/end2end/tests/bad_ping.c b/test/core/end2end/tests/bad_ping.c
index 38cd1dfa84..0928ba60cf 100644
--- a/test/core/end2end/tests/bad_ping.c
+++ b/test/core/end2end/tests/bad_ping.c
@@ -208,7 +208,7 @@ static void test_bad_ping(grpc_end2end_test_config config) {
CQ_EXPECT_COMPLETION(cqv, tag(0xdead), 1);
cq_verify(cqv);
- grpc_call_destroy(s);
+ grpc_call_unref(s);
// The connection should be closed immediately after the misbehaved pings,
// the in-progress RPC should fail.
@@ -224,7 +224,7 @@ static void test_bad_ping(grpc_end2end_test_config config) {
grpc_metadata_array_destroy(&trailing_metadata_recv);
grpc_metadata_array_destroy(&request_metadata_recv);
grpc_call_details_destroy(&call_details);
- grpc_call_destroy(c);
+ grpc_call_unref(c);
cq_verifier_destroy(cqv);
end_test(&f);
config.tear_down_data(&f);
diff --git a/test/core/end2end/tests/binary_metadata.c b/test/core/end2end/tests/binary_metadata.c
index 2bddd053d6..3d36849400 100644
--- a/test/core/end2end/tests/binary_metadata.c
+++ b/test/core/end2end/tests/binary_metadata.c
@@ -314,8 +314,8 @@ static void test_request_response_with_metadata_and_payload(
grpc_metadata_array_destroy(&request_metadata_recv);
grpc_call_details_destroy(&call_details);
- grpc_call_destroy(c);
- grpc_call_destroy(s);
+ grpc_call_unref(c);
+ grpc_call_unref(s);
cq_verifier_destroy(cqv);
diff --git a/test/core/end2end/tests/call_creds.c b/test/core/end2end/tests/call_creds.c
index 9ec9701f9c..bc430e56b3 100644
--- a/test/core/end2end/tests/call_creds.c
+++ b/test/core/end2end/tests/call_creds.c
@@ -347,8 +347,8 @@ static void request_response_with_payload_and_call_creds(
grpc_metadata_array_destroy(&request_metadata_recv);
grpc_call_details_destroy(&call_details);
- grpc_call_destroy(c);
- grpc_call_destroy(s);
+ grpc_call_unref(c);
+ grpc_call_unref(s);
cq_verifier_destroy(cqv);
@@ -473,7 +473,7 @@ static void test_request_with_server_rejecting_client_creds(
grpc_byte_buffer_destroy(response_payload_recv);
grpc_slice_unref(details);
- grpc_call_destroy(c);
+ grpc_call_unref(c);
cq_verifier_destroy(cqv);
end_test(&f);
diff --git a/test/core/end2end/tests/cancel_after_accept.c b/test/core/end2end/tests/cancel_after_accept.c
index 7946865a83..e6bcd9d6a3 100644
--- a/test/core/end2end/tests/cancel_after_accept.c
+++ b/test/core/end2end/tests/cancel_after_accept.c
@@ -252,8 +252,8 @@ static void test_cancel_after_accept(grpc_end2end_test_config config,
grpc_byte_buffer_destroy(response_payload_recv);
grpc_slice_unref(details);
- grpc_call_destroy(c);
- grpc_call_destroy(s);
+ grpc_call_unref(c);
+ grpc_call_unref(s);
if (args != NULL) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
diff --git a/test/core/end2end/tests/cancel_after_client_done.c b/test/core/end2end/tests/cancel_after_client_done.c
index 7089f3f557..d0e68354d9 100644
--- a/test/core/end2end/tests/cancel_after_client_done.c
+++ b/test/core/end2end/tests/cancel_after_client_done.c
@@ -229,8 +229,8 @@ static void test_cancel_after_accept_and_writes_closed(
grpc_byte_buffer_destroy(response_payload_recv);
grpc_slice_unref(details);
- grpc_call_destroy(c);
- grpc_call_destroy(s);
+ grpc_call_unref(c);
+ grpc_call_unref(s);
cq_verifier_destroy(cqv);
end_test(&f);
diff --git a/test/core/end2end/tests/cancel_after_invoke.c b/test/core/end2end/tests/cancel_after_invoke.c
index f29012b86d..5bc9ed283b 100644
--- a/test/core/end2end/tests/cancel_after_invoke.c
+++ b/test/core/end2end/tests/cancel_after_invoke.c
@@ -49,11 +49,12 @@ static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
const char *test_name,
cancellation_mode mode,
+ size_t test_ops,
grpc_channel_args *client_args,
grpc_channel_args *server_args) {
grpc_end2end_test_fixture f;
- gpr_log(GPR_INFO, "Running test: %s/%s/%s", test_name, config.name,
- mode.name);
+ gpr_log(GPR_INFO, "Running test: %s/%s/%s [%" PRIdPTR " ops]", test_name,
+ config.name, mode.name, test_ops);
f = config.create_fixture(client_args, server_args);
config.init_server(&f, server_args);
config.init_client(&f, client_args);
@@ -108,8 +109,8 @@ static void test_cancel_after_invoke(grpc_end2end_test_config config,
grpc_op ops[6];
grpc_op *op;
grpc_call *c;
- grpc_end2end_test_fixture f =
- begin_test(config, "test_cancel_after_invoke", mode, NULL, NULL);
+ grpc_end2end_test_fixture f = begin_test(config, "test_cancel_after_invoke",
+ mode, test_ops, NULL, NULL);
cq_verifier *cqv = cq_verifier_create(f.cq);
grpc_metadata_array initial_metadata_recv;
grpc_metadata_array trailing_metadata_recv;
@@ -189,7 +190,7 @@ static void test_cancel_after_invoke(grpc_end2end_test_config config,
grpc_byte_buffer_destroy(response_payload_recv);
grpc_slice_unref(details);
- grpc_call_destroy(c);
+ grpc_call_unref(c);
cq_verifier_destroy(cqv);
end_test(&f);
diff --git a/test/core/end2end/tests/cancel_before_invoke.c b/test/core/end2end/tests/cancel_before_invoke.c
index 1b1296dc2a..67d2e9b8ab 100644
--- a/test/core/end2end/tests/cancel_before_invoke.c
+++ b/test/core/end2end/tests/cancel_before_invoke.c
@@ -186,7 +186,7 @@ static void test_cancel_before_invoke(grpc_end2end_test_config config,
grpc_byte_buffer_destroy(response_payload_recv);
grpc_slice_unref(details);
- grpc_call_destroy(c);
+ grpc_call_unref(c);
cq_verifier_destroy(cqv);
end_test(&f);
diff --git a/test/core/end2end/tests/cancel_in_a_vacuum.c b/test/core/end2end/tests/cancel_in_a_vacuum.c
index 4f5e496432..1235cef2dc 100644
--- a/test/core/end2end/tests/cancel_in_a_vacuum.c
+++ b/test/core/end2end/tests/cancel_in_a_vacuum.c
@@ -118,7 +118,7 @@ static void test_cancel_in_a_vacuum(grpc_end2end_test_config config,
GPR_ASSERT(GRPC_CALL_OK == mode.initiate_cancel(c, NULL));
- grpc_call_destroy(c);
+ grpc_call_unref(c);
cq_verifier_destroy(v_client);
end_test(&f);
diff --git a/test/core/end2end/tests/cancel_with_status.c b/test/core/end2end/tests/cancel_with_status.c
index 180748c2ae..e8259f99f1 100644
--- a/test/core/end2end/tests/cancel_with_status.c
+++ b/test/core/end2end/tests/cancel_with_status.c
@@ -165,7 +165,7 @@ static void simple_request_body(grpc_end2end_test_config config,
grpc_metadata_array_destroy(&initial_metadata_recv);
grpc_metadata_array_destroy(&trailing_metadata_recv);
- grpc_call_destroy(c);
+ grpc_call_unref(c);
cq_verifier_destroy(cqv);
}
diff --git a/test/core/end2end/tests/compressed_payload.c b/test/core/end2end/tests/compressed_payload.c
index 1671ce5564..1fe8613adb 100644
--- a/test/core/end2end/tests/compressed_payload.c
+++ b/test/core/end2end/tests/compressed_payload.c
@@ -261,8 +261,8 @@ static void request_for_disabled_algorithm(
grpc_metadata_array_destroy(&request_metadata_recv);
grpc_call_details_destroy(&call_details);
- grpc_call_destroy(c);
- grpc_call_destroy(s);
+ grpc_call_unref(c);
+ grpc_call_unref(s);
cq_verifier_destroy(cqv);
@@ -519,8 +519,8 @@ static void request_with_payload_template(
grpc_metadata_array_destroy(&request_metadata_recv);
grpc_call_details_destroy(&call_details);
- grpc_call_destroy(c);
- grpc_call_destroy(s);
+ grpc_call_unref(c);
+ grpc_call_unref(s);
cq_verifier_destroy(cqv);
diff --git a/test/core/end2end/tests/default_host.c b/test/core/end2end/tests/default_host.c
index c0ae50ec62..efd2682932 100644
--- a/test/core/end2end/tests/default_host.c
+++ b/test/core/end2end/tests/default_host.c
@@ -214,8 +214,8 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
grpc_metadata_array_destroy(&request_metadata_recv);
grpc_call_details_destroy(&call_details);
- grpc_call_destroy(c);
- grpc_call_destroy(s);
+ grpc_call_unref(c);
+ grpc_call_unref(s);
cq_verifier_destroy(cqv);
}
diff --git a/test/core/end2end/tests/disappearing_server.c b/test/core/end2end/tests/disappearing_server.c
index 22492c0bfc..23016f9ee5 100644
--- a/test/core/end2end/tests/disappearing_server.c
+++ b/test/core/end2end/tests/disappearing_server.c
@@ -191,8 +191,8 @@ static void do_request_and_shutdown_server(grpc_end2end_test_config config,
grpc_metadata_array_destroy(&request_metadata_recv);
grpc_call_details_destroy(&call_details);
- grpc_call_destroy(c);
- grpc_call_destroy(s);
+ grpc_call_unref(c);
+ grpc_call_unref(s);
}
static void disappearing_server_test(grpc_end2end_test_config config) {
diff --git a/test/core/end2end/tests/empty_batch.c b/test/core/end2end/tests/empty_batch.c
index fe57a6e514..d0971367a6 100644
--- a/test/core/end2end/tests/empty_batch.c
+++ b/test/core/end2end/tests/empty_batch.c
@@ -121,7 +121,7 @@ static void empty_batch_body(grpc_end2end_test_config config,
CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
- grpc_call_destroy(c);
+ grpc_call_unref(c);
cq_verifier_destroy(cqv);
}
diff --git a/test/core/end2end/tests/filter_call_init_fails.c b/test/core/end2end/tests/filter_call_init_fails.c
index 8d654d7587..3402584fd9 100644
--- a/test/core/end2end/tests/filter_call_init_fails.c
+++ b/test/core/end2end/tests/filter_call_init_fails.c
@@ -194,7 +194,7 @@ static void test_server_channel_filter(grpc_end2end_test_config config) {
grpc_metadata_array_destroy(&request_metadata_recv);
grpc_call_details_destroy(&call_details);
- grpc_call_destroy(c);
+ grpc_call_unref(c);
cq_verifier_destroy(cqv);
@@ -284,7 +284,7 @@ static void test_client_channel_filter(grpc_end2end_test_config config) {
grpc_metadata_array_destroy(&request_metadata_recv);
grpc_call_details_destroy(&call_details);
- grpc_call_destroy(c);
+ grpc_call_unref(c);
cq_verifier_destroy(cqv);
@@ -372,7 +372,7 @@ static void test_client_subchannel_filter(grpc_end2end_test_config config) {
// Reset and create a new call. (The first call uses a different code
// path in client_channel.c than subsequent calls on the same channel,
// and we need to test both.)
- grpc_call_destroy(c);
+ grpc_call_unref(c);
status = GRPC_STATUS_OK;
grpc_slice_unref(details);
details = grpc_empty_slice();
@@ -399,7 +399,7 @@ static void test_client_subchannel_filter(grpc_end2end_test_config config) {
grpc_metadata_array_destroy(&request_metadata_recv);
grpc_call_details_destroy(&call_details);
- grpc_call_destroy(c);
+ grpc_call_unref(c);
cq_verifier_destroy(cqv);
diff --git a/test/core/end2end/tests/filter_causes_close.c b/test/core/end2end/tests/filter_causes_close.c
index decfff3429..ede8fb49df 100644
--- a/test/core/end2end/tests/filter_causes_close.c
+++ b/test/core/end2end/tests/filter_causes_close.c
@@ -189,7 +189,7 @@ static void test_request(grpc_end2end_test_config config) {
grpc_metadata_array_destroy(&request_metadata_recv);
grpc_call_details_destroy(&call_details);
- grpc_call_destroy(c);
+ grpc_call_unref(c);
cq_verifier_destroy(cqv);
diff --git a/test/core/end2end/tests/filter_latency.c b/test/core/end2end/tests/filter_latency.c
index e87e7339b8..7d2614a067 100644
--- a/test/core/end2end/tests/filter_latency.c
+++ b/test/core/end2end/tests/filter_latency.c
@@ -228,8 +228,8 @@ static void test_request(grpc_end2end_test_config config) {
grpc_metadata_array_destroy(&request_metadata_recv);
grpc_call_details_destroy(&call_details);
- grpc_call_destroy(s);
- grpc_call_destroy(c);
+ grpc_call_unref(s);
+ grpc_call_unref(c);
cq_verifier_destroy(cqv);
diff --git a/test/core/end2end/tests/graceful_server_shutdown.c b/test/core/end2end/tests/graceful_server_shutdown.c
index efb54a4a1d..37ac33818f 100644
--- a/test/core/end2end/tests/graceful_server_shutdown.c
+++ b/test/core/end2end/tests/graceful_server_shutdown.c
@@ -192,7 +192,7 @@ static void test_early_server_shutdown_finishes_inflight_calls(
CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
- grpc_call_destroy(s);
+ grpc_call_unref(s);
GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED);
GPR_ASSERT(0 == grpc_slice_str_cmp(call_details.method, "/foo"));
@@ -206,7 +206,7 @@ static void test_early_server_shutdown_finishes_inflight_calls(
grpc_metadata_array_destroy(&request_metadata_recv);
grpc_call_details_destroy(&call_details);
- grpc_call_destroy(c);
+ grpc_call_unref(c);
cq_verifier_destroy(cqv);
diff --git a/test/core/end2end/tests/high_initial_seqno.c b/test/core/end2end/tests/high_initial_seqno.c
index ae364fd293..893fdd6862 100644
--- a/test/core/end2end/tests/high_initial_seqno.c
+++ b/test/core/end2end/tests/high_initial_seqno.c
@@ -205,8 +205,8 @@ static void simple_request_body(grpc_end2end_test_config config,
grpc_metadata_array_destroy(&request_metadata_recv);
grpc_call_details_destroy(&call_details);
- grpc_call_destroy(c);
- grpc_call_destroy(s);
+ grpc_call_unref(c);
+ grpc_call_unref(s);
/* TODO(ctiller): this rate limits the test, and it should be removed when
retry has been implemented; until then cross-thread chatter
diff --git a/test/core/end2end/tests/hpack_size.c b/test/core/end2end/tests/hpack_size.c
index 15f5bb0240..b1db58271e 100644
--- a/test/core/end2end/tests/hpack_size.c
+++ b/test/core/end2end/tests/hpack_size.c
@@ -358,8 +358,8 @@ static void simple_request_body(grpc_end2end_test_config config,
grpc_metadata_array_destroy(&request_metadata_recv);
grpc_call_details_destroy(&call_details);
- grpc_call_destroy(c);
- grpc_call_destroy(s);
+ grpc_call_unref(c);
+ grpc_call_unref(s);
cq_verifier_destroy(cqv);
}
diff --git a/test/core/end2end/tests/idempotent_request.c b/test/core/end2end/tests/idempotent_request.c
index 9c1ec25855..1ea2ac4774 100644
--- a/test/core/end2end/tests/idempotent_request.c
+++ b/test/core/end2end/tests/idempotent_request.c
@@ -219,8 +219,8 @@ static void simple_request_body(grpc_end2end_test_config config,
grpc_metadata_array_destroy(&request_metadata_recv);
grpc_call_details_destroy(&call_details);
- grpc_call_destroy(c);
- grpc_call_destroy(s);
+ grpc_call_unref(c);
+ grpc_call_unref(s);
cq_verifier_destroy(cqv);
}
diff --git a/test/core/end2end/tests/invoke_large_request.c b/test/core/end2end/tests/invoke_large_request.c
index a437fd7fb7..a49cf4f3d7 100644
--- a/test/core/end2end/tests/invoke_large_request.c
+++ b/test/core/end2end/tests/invoke_large_request.c
@@ -258,8 +258,8 @@ static void test_invoke_large_request(grpc_end2end_test_config config,
grpc_metadata_array_destroy(&request_metadata_recv);
grpc_call_details_destroy(&call_details);
- grpc_call_destroy(c);
- grpc_call_destroy(s);
+ grpc_call_unref(c);
+ grpc_call_unref(s);
cq_verifier_destroy(cqv);
diff --git a/test/core/end2end/tests/keepalive_timeout.c b/test/core/end2end/tests/keepalive_timeout.c
index 33a409b7bc..ceefe5db8e 100644
--- a/test/core/end2end/tests/keepalive_timeout.c
+++ b/test/core/end2end/tests/keepalive_timeout.c
@@ -223,8 +223,8 @@ static void test_keepalive_timeout(grpc_end2end_test_config config) {
grpc_metadata_array_destroy(&request_metadata_recv);
grpc_call_details_destroy(&call_details);
- grpc_call_destroy(c);
- grpc_call_destroy(s);
+ grpc_call_unref(c);
+ grpc_call_unref(s);
cq_verifier_destroy(cqv);
diff --git a/test/core/end2end/tests/large_metadata.c b/test/core/end2end/tests/large_metadata.c
index cef03b69df..dd796889db 100644
--- a/test/core/end2end/tests/large_metadata.c
+++ b/test/core/end2end/tests/large_metadata.c
@@ -246,8 +246,8 @@ static void test_request_with_large_metadata(grpc_end2end_test_config config) {
grpc_metadata_array_destroy(&request_metadata_recv);
grpc_call_details_destroy(&call_details);
- grpc_call_destroy(c);
- grpc_call_destroy(s);
+ grpc_call_unref(c);
+ grpc_call_unref(s);
cq_verifier_destroy(cqv);
diff --git a/test/core/end2end/tests/load_reporting_hook.c b/test/core/end2end/tests/load_reporting_hook.c
index c021bc07ff..5f671405c2 100644
--- a/test/core/end2end/tests/load_reporting_hook.c
+++ b/test/core/end2end/tests/load_reporting_hook.c
@@ -266,8 +266,8 @@ static void request_response_with_payload(
grpc_metadata_array_destroy(&request_metadata_recv);
grpc_call_details_destroy(&call_details);
- grpc_call_destroy(c);
- grpc_call_destroy(s);
+ grpc_call_unref(c);
+ grpc_call_unref(s);
cq_verifier_destroy(cqv);
diff --git a/test/core/end2end/tests/max_concurrent_streams.c b/test/core/end2end/tests/max_concurrent_streams.c
index 645701613b..8ec92e476a 100644
--- a/test/core/end2end/tests/max_concurrent_streams.c
+++ b/test/core/end2end/tests/max_concurrent_streams.c
@@ -201,8 +201,8 @@ static void simple_request_body(grpc_end2end_test_config config,
grpc_metadata_array_destroy(&request_metadata_recv);
grpc_call_details_destroy(&call_details);
- grpc_call_destroy(c);
- grpc_call_destroy(s);
+ grpc_call_unref(c);
+ grpc_call_unref(s);
cq_verifier_destroy(cqv);
}
@@ -433,10 +433,10 @@ static void test_max_concurrent_streams(grpc_end2end_test_config config) {
cq_verifier_destroy(cqv);
- grpc_call_destroy(c1);
- grpc_call_destroy(s1);
- grpc_call_destroy(c2);
- grpc_call_destroy(s2);
+ grpc_call_unref(c1);
+ grpc_call_unref(s1);
+ grpc_call_unref(c2);
+ grpc_call_unref(s2);
grpc_slice_unref(details1);
grpc_slice_unref(details2);
@@ -628,10 +628,10 @@ static void test_max_concurrent_streams_with_timeout_on_first(
cq_verifier_destroy(cqv);
- grpc_call_destroy(c1);
- grpc_call_destroy(s1);
- grpc_call_destroy(c2);
- grpc_call_destroy(s2);
+ grpc_call_unref(c1);
+ grpc_call_unref(s1);
+ grpc_call_unref(c2);
+ grpc_call_unref(s2);
grpc_slice_unref(details1);
grpc_slice_unref(details2);
@@ -789,7 +789,7 @@ static void test_max_concurrent_streams_with_timeout_on_second(
/* second request is finished because of time out, so destroy the second call
*/
- grpc_call_destroy(c2);
+ grpc_call_unref(c2);
/* now reply the first call */
memset(ops, 0, sizeof(ops));
@@ -821,8 +821,8 @@ static void test_max_concurrent_streams_with_timeout_on_second(
cq_verifier_destroy(cqv);
- grpc_call_destroy(c1);
- grpc_call_destroy(s1);
+ grpc_call_unref(c1);
+ grpc_call_unref(s1);
grpc_slice_unref(details1);
grpc_slice_unref(details2);
diff --git a/test/core/end2end/tests/max_connection_age.c b/test/core/end2end/tests/max_connection_age.c
index 7b41fa597b..c470dcda69 100644
--- a/test/core/end2end/tests/max_connection_age.c
+++ b/test/core/end2end/tests/max_connection_age.c
@@ -214,7 +214,7 @@ static void test_max_age_forcibly_close(grpc_end2end_test_config config) {
CQ_EXPECT_COMPLETION(cqv, tag(0xdead), true);
cq_verify(cqv);
- grpc_call_destroy(s);
+ grpc_call_unref(s);
/* The connection should be closed immediately after the max age grace period,
the in-progress RPC should fail. */
@@ -230,7 +230,7 @@ static void test_max_age_forcibly_close(grpc_end2end_test_config config) {
grpc_metadata_array_destroy(&trailing_metadata_recv);
grpc_metadata_array_destroy(&request_metadata_recv);
grpc_call_details_destroy(&call_details);
- grpc_call_destroy(c);
+ grpc_call_unref(c);
cq_verifier_destroy(cqv);
end_test(&f);
config.tear_down_data(&f);
@@ -352,7 +352,7 @@ static void test_max_age_gracefully_close(grpc_end2end_test_config config) {
CQ_EXPECT_COMPLETION(cqv, tag(0xdead), true);
cq_verify(cqv);
- grpc_call_destroy(s);
+ grpc_call_unref(s);
/* The connection is closed gracefully with goaway, the rpc should still be
completed. */
@@ -368,7 +368,7 @@ static void test_max_age_gracefully_close(grpc_end2end_test_config config) {
grpc_metadata_array_destroy(&trailing_metadata_recv);
grpc_metadata_array_destroy(&request_metadata_recv);
grpc_call_details_destroy(&call_details);
- grpc_call_destroy(c);
+ grpc_call_unref(c);
cq_verifier_destroy(cqv);
end_test(&f);
config.tear_down_data(&f);
diff --git a/test/core/end2end/tests/max_connection_idle.c b/test/core/end2end/tests/max_connection_idle.c
index ceb02947fe..488d945123 100644
--- a/test/core/end2end/tests/max_connection_idle.c
+++ b/test/core/end2end/tests/max_connection_idle.c
@@ -175,8 +175,8 @@ static void simple_request_body(grpc_end2end_test_config config,
grpc_metadata_array_destroy(&request_metadata_recv);
grpc_call_details_destroy(&call_details);
- grpc_call_destroy(c);
- grpc_call_destroy(s);
+ grpc_call_unref(c);
+ grpc_call_unref(s);
cq_verifier_destroy(cqv);
}
diff --git a/test/core/end2end/tests/max_message_length.c b/test/core/end2end/tests/max_message_length.c
index 224c1cd833..f65edab865 100644
--- a/test/core/end2end/tests/max_message_length.c
+++ b/test/core/end2end/tests/max_message_length.c
@@ -289,8 +289,8 @@ done:
grpc_byte_buffer_destroy(request_payload);
grpc_byte_buffer_destroy(recv_payload);
- grpc_call_destroy(c);
- if (s != NULL) grpc_call_destroy(s);
+ grpc_call_unref(c);
+ if (s != NULL) grpc_call_unref(s);
cq_verifier_destroy(cqv);
@@ -483,8 +483,8 @@ static void test_max_message_length_on_response(grpc_end2end_test_config config,
grpc_byte_buffer_destroy(response_payload);
grpc_byte_buffer_destroy(recv_payload);
- grpc_call_destroy(c);
- if (s != NULL) grpc_call_destroy(s);
+ grpc_call_unref(c);
+ if (s != NULL) grpc_call_unref(s);
cq_verifier_destroy(cqv);
diff --git a/test/core/end2end/tests/negative_deadline.c b/test/core/end2end/tests/negative_deadline.c
index 52c1a72bbf..113b650a97 100644
--- a/test/core/end2end/tests/negative_deadline.c
+++ b/test/core/end2end/tests/negative_deadline.c
@@ -162,7 +162,7 @@ static void simple_request_body(grpc_end2end_test_config config,
grpc_metadata_array_destroy(&initial_metadata_recv);
grpc_metadata_array_destroy(&trailing_metadata_recv);
- grpc_call_destroy(c);
+ grpc_call_unref(c);
cq_verifier_destroy(cqv);
}
diff --git a/test/core/end2end/tests/network_status_change.c b/test/core/end2end/tests/network_status_change.c
index a810489bf2..1ea4be81b1 100644
--- a/test/core/end2end/tests/network_status_change.c
+++ b/test/core/end2end/tests/network_status_change.c
@@ -231,8 +231,8 @@ static void test_invoke_network_status_change(grpc_end2end_test_config config) {
grpc_metadata_array_destroy(&request_metadata_recv);
grpc_call_details_destroy(&call_details);
- grpc_call_destroy(c);
- grpc_call_destroy(s);
+ grpc_call_unref(c);
+ grpc_call_unref(s);
cq_verifier_destroy(cqv);
diff --git a/test/core/end2end/tests/no_logging.c b/test/core/end2end/tests/no_logging.c
index 44e8188059..17b6886f2c 100644
--- a/test/core/end2end/tests/no_logging.c
+++ b/test/core/end2end/tests/no_logging.c
@@ -244,8 +244,8 @@ static void simple_request_body(grpc_end2end_test_config config,
grpc_metadata_array_destroy(&request_metadata_recv);
grpc_call_details_destroy(&call_details);
- grpc_call_destroy(c);
- grpc_call_destroy(s);
+ grpc_call_unref(c);
+ grpc_call_unref(s);
cq_verifier_destroy(cqv);
}
diff --git a/test/core/end2end/tests/payload.c b/test/core/end2end/tests/payload.c
index df9004fb55..3f25ecb8ff 100644
--- a/test/core/end2end/tests/payload.c
+++ b/test/core/end2end/tests/payload.c
@@ -261,8 +261,8 @@ static void request_response_with_payload(grpc_end2end_test_config config,
grpc_metadata_array_destroy(&request_metadata_recv);
grpc_call_details_destroy(&call_details);
- grpc_call_destroy(c);
- grpc_call_destroy(s);
+ grpc_call_unref(c);
+ grpc_call_unref(s);
cq_verifier_destroy(cqv);
diff --git a/test/core/end2end/tests/ping_pong_streaming.c b/test/core/end2end/tests/ping_pong_streaming.c
index fc5a0a5ec3..598e45ee33 100644
--- a/test/core/end2end/tests/ping_pong_streaming.c
+++ b/test/core/end2end/tests/ping_pong_streaming.c
@@ -265,8 +265,8 @@ static void test_pingpong_streaming(grpc_end2end_test_config config,
CQ_EXPECT_COMPLETION(cqv, tag(104), 1);
cq_verify(cqv);
- grpc_call_destroy(c);
- grpc_call_destroy(s);
+ grpc_call_unref(c);
+ grpc_call_unref(s);
cq_verifier_destroy(cqv);
diff --git a/test/core/end2end/tests/registered_call.c b/test/core/end2end/tests/registered_call.c
index 258040371f..7e07a7129c 100644
--- a/test/core/end2end/tests/registered_call.c
+++ b/test/core/end2end/tests/registered_call.c
@@ -200,8 +200,8 @@ static void simple_request_body(grpc_end2end_test_config config,
grpc_metadata_array_destroy(&request_metadata_recv);
grpc_call_details_destroy(&call_details);
- grpc_call_destroy(c);
- grpc_call_destroy(s);
+ grpc_call_unref(c);
+ grpc_call_unref(s);
cq_verifier_destroy(cqv);
}
diff --git a/test/core/end2end/tests/request_with_flags.c b/test/core/end2end/tests/request_with_flags.c
index e913fa46c3..daf15fa5f7 100644
--- a/test/core/end2end/tests/request_with_flags.c
+++ b/test/core/end2end/tests/request_with_flags.c
@@ -179,7 +179,7 @@ static void test_invoke_request_with_flags(
grpc_metadata_array_destroy(&request_metadata_recv);
grpc_call_details_destroy(&call_details);
- grpc_call_destroy(c);
+ grpc_call_unref(c);
cq_verifier_destroy(cqv);
diff --git a/test/core/end2end/tests/request_with_payload.c b/test/core/end2end/tests/request_with_payload.c
index 17c0761090..43686d58ab 100644
--- a/test/core/end2end/tests/request_with_payload.c
+++ b/test/core/end2end/tests/request_with_payload.c
@@ -226,8 +226,8 @@ static void test_invoke_request_with_payload(grpc_end2end_test_config config) {
grpc_metadata_array_destroy(&request_metadata_recv);
grpc_call_details_destroy(&call_details);
- grpc_call_destroy(c);
- grpc_call_destroy(s);
+ grpc_call_unref(c);
+ grpc_call_unref(s);
cq_verifier_destroy(cqv);
diff --git a/test/core/end2end/tests/resource_quota_server.c b/test/core/end2end/tests/resource_quota_server.c
index b5bc39915a..6418f5d01a 100644
--- a/test/core/end2end/tests/resource_quota_server.c
+++ b/test/core/end2end/tests/resource_quota_server.c
@@ -169,6 +169,7 @@ void resource_quota_server(grpc_end2end_test_config config) {
int cancelled_calls_on_client = 0;
int cancelled_calls_on_server = 0;
int deadline_exceeded = 0;
+ int unavailable = 0;
grpc_byte_buffer *request_payload =
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
@@ -260,6 +261,9 @@ void resource_quota_server(grpc_end2end_test_config config) {
case GRPC_STATUS_DEADLINE_EXCEEDED:
deadline_exceeded++;
break;
+ case GRPC_STATUS_UNAVAILABLE:
+ unavailable++;
+ break;
case GRPC_STATUS_OK:
break;
default:
@@ -270,7 +274,7 @@ void resource_quota_server(grpc_end2end_test_config config) {
grpc_metadata_array_destroy(&initial_metadata_recv[call_id]);
grpc_metadata_array_destroy(&trailing_metadata_recv[call_id]);
- grpc_call_destroy(client_calls[call_id]);
+ grpc_call_unref(client_calls[call_id]);
grpc_slice_unref(details[call_id]);
pending_client_calls--;
@@ -352,15 +356,15 @@ void resource_quota_server(grpc_end2end_test_config config) {
GPR_ASSERT(pending_server_end_calls > 0);
pending_server_end_calls--;
- grpc_call_destroy(server_calls[call_id]);
+ grpc_call_unref(server_calls[call_id]);
}
}
gpr_log(GPR_INFO,
"Done. %d total calls: %d cancelled at server, %d cancelled at "
- "client, %d timed out.",
+ "client, %d timed out, %d unavailable.",
NUM_CALLS, cancelled_calls_on_server, cancelled_calls_on_client,
- deadline_exceeded);
+ deadline_exceeded, unavailable);
grpc_byte_buffer_destroy(request_payload);
grpc_slice_unref(request_payload_slice);
diff --git a/test/core/end2end/tests/server_finishes_request.c b/test/core/end2end/tests/server_finishes_request.c
index 990f063090..be0901bfdd 100644
--- a/test/core/end2end/tests/server_finishes_request.c
+++ b/test/core/end2end/tests/server_finishes_request.c
@@ -199,8 +199,8 @@ static void simple_request_body(grpc_end2end_test_config config,
grpc_metadata_array_destroy(&request_metadata_recv);
grpc_call_details_destroy(&call_details);
- grpc_call_destroy(c);
- grpc_call_destroy(s);
+ grpc_call_unref(c);
+ grpc_call_unref(s);
cq_verifier_destroy(cqv);
}
diff --git a/test/core/end2end/tests/shutdown_finishes_calls.c b/test/core/end2end/tests/shutdown_finishes_calls.c
index 2385423538..d19af1a74d 100644
--- a/test/core/end2end/tests/shutdown_finishes_calls.c
+++ b/test/core/end2end/tests/shutdown_finishes_calls.c
@@ -186,8 +186,8 @@ static void test_early_server_shutdown_finishes_inflight_calls(
grpc_metadata_array_destroy(&request_metadata_recv);
grpc_call_details_destroy(&call_details);
- grpc_call_destroy(c);
- grpc_call_destroy(s);
+ grpc_call_unref(c);
+ grpc_call_unref(s);
cq_verifier_destroy(cqv);
diff --git a/test/core/end2end/tests/simple_cacheable_request.c b/test/core/end2end/tests/simple_cacheable_request.c
index d0c292c338..cc0f89c422 100644
--- a/test/core/end2end/tests/simple_cacheable_request.c
+++ b/test/core/end2end/tests/simple_cacheable_request.c
@@ -274,8 +274,8 @@ static void test_cacheable_request_response_with_metadata_and_payload(
grpc_metadata_array_destroy(&request_metadata_recv);
grpc_call_details_destroy(&call_details);
- grpc_call_destroy(c);
- grpc_call_destroy(s);
+ grpc_call_unref(c);
+ grpc_call_unref(s);
cq_verifier_destroy(cqv);
diff --git a/test/core/end2end/tests/simple_delayed_request.c b/test/core/end2end/tests/simple_delayed_request.c
index c8b88def1f..9e938f86a6 100644
--- a/test/core/end2end/tests/simple_delayed_request.c
+++ b/test/core/end2end/tests/simple_delayed_request.c
@@ -195,8 +195,8 @@ static void simple_delayed_request_body(grpc_end2end_test_config config,
grpc_metadata_array_destroy(&request_metadata_recv);
grpc_call_details_destroy(&call_details);
- grpc_call_destroy(c);
- grpc_call_destroy(s);
+ grpc_call_unref(c);
+ grpc_call_unref(s);
cq_verifier_destroy(cqv);
}
diff --git a/test/core/end2end/tests/simple_metadata.c b/test/core/end2end/tests/simple_metadata.c
index 367f0b7696..08679a588a 100644
--- a/test/core/end2end/tests/simple_metadata.c
+++ b/test/core/end2end/tests/simple_metadata.c
@@ -266,8 +266,8 @@ static void test_request_response_with_metadata_and_payload(
grpc_metadata_array_destroy(&request_metadata_recv);
grpc_call_details_destroy(&call_details);
- grpc_call_destroy(c);
- grpc_call_destroy(s);
+ grpc_call_unref(c);
+ grpc_call_unref(s);
cq_verifier_destroy(cqv);
diff --git a/test/core/end2end/tests/simple_request.c b/test/core/end2end/tests/simple_request.c
index 0f19fd0b0f..45c717363b 100644
--- a/test/core/end2end/tests/simple_request.c
+++ b/test/core/end2end/tests/simple_request.c
@@ -219,8 +219,8 @@ static void simple_request_body(grpc_end2end_test_config config,
grpc_metadata_array_destroy(&request_metadata_recv);
grpc_call_details_destroy(&call_details);
- grpc_call_destroy(c);
- grpc_call_destroy(s);
+ grpc_call_unref(c);
+ grpc_call_unref(s);
cq_verifier_destroy(cqv);
}
diff --git a/test/core/end2end/tests/streaming_error_response.c b/test/core/end2end/tests/streaming_error_response.c
index 0946552271..e59675a655 100644
--- a/test/core/end2end/tests/streaming_error_response.c
+++ b/test/core/end2end/tests/streaming_error_response.c
@@ -263,8 +263,8 @@ static void test(grpc_end2end_test_config config, bool request_status_early) {
grpc_metadata_array_destroy(&request_metadata_recv);
grpc_call_details_destroy(&call_details);
- grpc_call_destroy(c);
- grpc_call_destroy(s);
+ grpc_call_unref(c);
+ grpc_call_unref(s);
cq_verifier_destroy(cqv);
diff --git a/test/core/end2end/tests/trailing_metadata.c b/test/core/end2end/tests/trailing_metadata.c
index 78046261c3..ca8eb6389e 100644
--- a/test/core/end2end/tests/trailing_metadata.c
+++ b/test/core/end2end/tests/trailing_metadata.c
@@ -276,8 +276,8 @@ static void test_request_response_with_metadata_and_payload(
grpc_metadata_array_destroy(&request_metadata_recv);
grpc_call_details_destroy(&call_details);
- grpc_call_destroy(c);
- grpc_call_destroy(s);
+ grpc_call_unref(c);
+ grpc_call_unref(s);
cq_verifier_destroy(cqv);
diff --git a/test/core/end2end/tests/write_buffering.c b/test/core/end2end/tests/write_buffering.c
index e937912d5f..f8f2102e67 100644
--- a/test/core/end2end/tests/write_buffering.c
+++ b/test/core/end2end/tests/write_buffering.c
@@ -274,8 +274,8 @@ static void test_invoke_request_with_payload(grpc_end2end_test_config config) {
grpc_metadata_array_destroy(&request_metadata_recv);
grpc_call_details_destroy(&call_details);
- grpc_call_destroy(c);
- grpc_call_destroy(s);
+ grpc_call_unref(c);
+ grpc_call_unref(s);
cq_verifier_destroy(cqv);
diff --git a/test/core/end2end/tests/write_buffering_at_end.c b/test/core/end2end/tests/write_buffering_at_end.c
index 42024cfa9b..2facd9c1a4 100644
--- a/test/core/end2end/tests/write_buffering_at_end.c
+++ b/test/core/end2end/tests/write_buffering_at_end.c
@@ -265,8 +265,8 @@ static void test_invoke_request_with_payload(grpc_end2end_test_config config) {
grpc_metadata_array_destroy(&request_metadata_recv);
grpc_call_details_destroy(&call_details);
- grpc_call_destroy(c);
- grpc_call_destroy(s);
+ grpc_call_unref(c);
+ grpc_call_unref(s);
cq_verifier_destroy(cqv);