|
|
|
@ -137,9 +137,8 @@ static void kill_server(const servers_fixture *f, size_t i) { |
|
|
|
|
gpr_log(GPR_INFO, "KILLING SERVER %d", i); |
|
|
|
|
GPR_ASSERT(f->servers[i] != NULL); |
|
|
|
|
grpc_server_shutdown_and_notify(f->servers[i], f->cq, tag(10000)); |
|
|
|
|
GPR_ASSERT( |
|
|
|
|
grpc_completion_queue_pluck(f->cq, tag(10000), n_millis_time(5000), NULL) |
|
|
|
|
.type == GRPC_OP_COMPLETE); |
|
|
|
|
GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(10000), n_millis_time(5000), |
|
|
|
|
NULL).type == GRPC_OP_COMPLETE); |
|
|
|
|
grpc_server_destroy(f->servers[i]); |
|
|
|
|
f->servers[i] = NULL; |
|
|
|
|
} |
|
|
|
@ -205,8 +204,8 @@ static void teardown_servers(servers_fixture *f) { |
|
|
|
|
if (f->servers[i] == NULL) continue; |
|
|
|
|
grpc_server_shutdown_and_notify(f->servers[i], f->cq, tag(10000)); |
|
|
|
|
GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(10000), |
|
|
|
|
n_millis_time(5000), NULL) |
|
|
|
|
.type == GRPC_OP_COMPLETE); |
|
|
|
|
n_millis_time(5000), |
|
|
|
|
NULL).type == GRPC_OP_COMPLETE); |
|
|
|
|
grpc_server_destroy(f->servers[i]); |
|
|
|
|
} |
|
|
|
|
grpc_completion_queue_shutdown(f->cq); |
|
|
|
@ -304,8 +303,8 @@ static int *perform_request(servers_fixture *f, grpc_channel *client, |
|
|
|
|
|
|
|
|
|
s_idx = -1; |
|
|
|
|
while ((ev = grpc_completion_queue_next( |
|
|
|
|
f->cq, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1), NULL)) |
|
|
|
|
.type != GRPC_QUEUE_TIMEOUT) { |
|
|
|
|
f->cq, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1), NULL)).type != |
|
|
|
|
GRPC_QUEUE_TIMEOUT) { |
|
|
|
|
GPR_ASSERT(ev.type == GRPC_OP_COMPLETE); |
|
|
|
|
read_tag = ((int)(gpr_intptr)ev.tag); |
|
|
|
|
gpr_log(GPR_DEBUG, "EVENT: success:%d, type:%d, tag:%d iter:%d", |
|
|
|
@ -377,8 +376,9 @@ static int *perform_request(servers_fixture *f, grpc_channel *client, |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
GPR_ASSERT(grpc_completion_queue_next( |
|
|
|
|
f->cq, GRPC_TIMEOUT_MILLIS_TO_DEADLINE(200), NULL).type == GRPC_QUEUE_TIMEOUT); |
|
|
|
|
GPR_ASSERT(grpc_completion_queue_next(f->cq, |
|
|
|
|
GRPC_TIMEOUT_MILLIS_TO_DEADLINE(200), |
|
|
|
|
NULL).type == GRPC_QUEUE_TIMEOUT); |
|
|
|
|
|
|
|
|
|
grpc_metadata_array_destroy(&rdata->initial_metadata_recv); |
|
|
|
|
grpc_metadata_array_destroy(&rdata->trailing_metadata_recv); |
|
|
|
@ -800,7 +800,8 @@ static void verify_rebirth_round_robin(const servers_fixture *f, |
|
|
|
|
const size_t expected_seq_length = f->num_servers; |
|
|
|
|
int *seen_elements; |
|
|
|
|
|
|
|
|
|
dump_array("actual_connection_sequence", actual_connection_sequence, num_iters); |
|
|
|
|
dump_array("actual_connection_sequence", actual_connection_sequence, |
|
|
|
|
num_iters); |
|
|
|
|
|
|
|
|
|
/* verify conn. seq. expectation */ |
|
|
|
|
/* get the first unique run of length "num_servers". */ |
|
|
|
|