pull/18556/head
Yash Tibrewal 6 years ago
parent 685372f61e
commit ab29cdd28e
  1. 10
      test/core/end2end/tests/simple_request.cc

@ -86,6 +86,14 @@ static void end_test(grpc_end2end_test_fixture* f) {
grpc_completion_queue_destroy(f->shutdown_cq); grpc_completion_queue_destroy(f->shutdown_cq);
} }
static void check_peer(char* peer_name) {
// If the peer name is a uds path, then check if it is filled
if (strncmp(peer_name, "unix:/", strlen("unix:/")) == 0) {
GPR_ASSERT(strncmp(peer_name, "unix:/tmp/grpc_fullstack_test.",
strlen("unix:/tmp/grpc_fullstack_test.")) == 0);
}
}
static void simple_request_body(grpc_end2end_test_config config, static void simple_request_body(grpc_end2end_test_config config,
grpc_end2end_test_fixture f) { grpc_end2end_test_fixture f) {
grpc_call* c; grpc_call* c;
@ -166,10 +174,12 @@ static void simple_request_body(grpc_end2end_test_config config,
peer = grpc_call_get_peer(s); peer = grpc_call_get_peer(s);
GPR_ASSERT(peer != nullptr); GPR_ASSERT(peer != nullptr);
gpr_log(GPR_DEBUG, "server_peer=%s", peer); gpr_log(GPR_DEBUG, "server_peer=%s", peer);
check_peer(peer);
gpr_free(peer); gpr_free(peer);
peer = grpc_call_get_peer(c); peer = grpc_call_get_peer(c);
GPR_ASSERT(peer != nullptr); GPR_ASSERT(peer != nullptr);
gpr_log(GPR_DEBUG, "client_peer=%s", peer); gpr_log(GPR_DEBUG, "client_peer=%s", peer);
check_peer(peer);
gpr_free(peer); gpr_free(peer);
memset(ops, 0, sizeof(ops)); memset(ops, 0, sizeof(ops));

Loading…
Cancel
Save