|
|
|
@ -103,10 +103,10 @@ static void simple_request_body(grpc_end2end_test_config config, |
|
|
|
|
grpc_slice details; |
|
|
|
|
int was_cancelled = 2; |
|
|
|
|
char *peer; |
|
|
|
|
grpc_stats_data before; |
|
|
|
|
grpc_stats_data after; |
|
|
|
|
grpc_stats_data *before = gpr_malloc(sizeof(grpc_stats_data)); |
|
|
|
|
grpc_stats_data *after = gpr_malloc(sizeof(grpc_stats_data)); |
|
|
|
|
|
|
|
|
|
grpc_stats_collect(&before); |
|
|
|
|
grpc_stats_collect(before); |
|
|
|
|
|
|
|
|
|
gpr_timespec deadline = five_seconds_from_now(); |
|
|
|
|
c = grpc_channel_create_call( |
|
|
|
@ -214,9 +214,9 @@ static void simple_request_body(grpc_end2end_test_config config, |
|
|
|
|
|
|
|
|
|
cq_verifier_destroy(cqv); |
|
|
|
|
|
|
|
|
|
grpc_stats_collect(&after); |
|
|
|
|
grpc_stats_collect(after); |
|
|
|
|
|
|
|
|
|
char *stats = grpc_stats_data_as_json(&after); |
|
|
|
|
char *stats = grpc_stats_data_as_json(after); |
|
|
|
|
gpr_log(GPR_DEBUG, "%s", stats); |
|
|
|
|
gpr_free(stats); |
|
|
|
|
|
|
|
|
@ -224,12 +224,14 @@ static void simple_request_body(grpc_end2end_test_config config, |
|
|
|
|
if (config.feature_mask & FEATURE_MASK_SUPPORTS_REQUEST_PROXYING) { |
|
|
|
|
expected_calls *= 2; |
|
|
|
|
} |
|
|
|
|
GPR_ASSERT(after.counters[GRPC_STATS_COUNTER_CLIENT_CALLS_CREATED] - |
|
|
|
|
before.counters[GRPC_STATS_COUNTER_CLIENT_CALLS_CREATED] == |
|
|
|
|
GPR_ASSERT(after->counters[GRPC_STATS_COUNTER_CLIENT_CALLS_CREATED] - |
|
|
|
|
before->counters[GRPC_STATS_COUNTER_CLIENT_CALLS_CREATED] == |
|
|
|
|
expected_calls); |
|
|
|
|
GPR_ASSERT(after.counters[GRPC_STATS_COUNTER_SERVER_CALLS_CREATED] - |
|
|
|
|
before.counters[GRPC_STATS_COUNTER_SERVER_CALLS_CREATED] == |
|
|
|
|
GPR_ASSERT(after->counters[GRPC_STATS_COUNTER_SERVER_CALLS_CREATED] - |
|
|
|
|
before->counters[GRPC_STATS_COUNTER_SERVER_CALLS_CREATED] == |
|
|
|
|
expected_calls); |
|
|
|
|
gpr_free(before); |
|
|
|
|
gpr_free(after); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void test_invoke_simple_request(grpc_end2end_test_config config) { |
|
|
|
|