From 7d5b53e2a7d8140713592a68263fad12d7d76a05 Mon Sep 17 00:00:00 2001 From: apolcyn Date: Wed, 24 Jan 2024 12:24:04 -0800 Subject: [PATCH] [testing] minor logging improvement in http cli tests (#35654) as title Closes #35654 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35654 from apolcyn:fix_logs eb1fbcd7a5c7a5188b6552d95ddeb9059e4ed8d1 PiperOrigin-RevId: 601198258 --- test/core/http/httpcli_test.cc | 2 +- test/core/http/httpscli_test.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/core/http/httpcli_test.cc b/test/core/http/httpcli_test.cc index 4a2a2ea570f..070e7bb7311 100644 --- a/test/core/http/httpcli_test.cc +++ b/test/core/http/httpcli_test.cc @@ -160,10 +160,10 @@ void OnFinish(void* arg, grpc_error_handle error) { const char* expect = "Hello world!" "

This is a test

"; - GPR_ASSERT(error.ok()); grpc_http_response response = request_state->response; gpr_log(GPR_INFO, "response status=%d error=%s", response.status, grpc_core::StatusToString(error).c_str()); + GPR_ASSERT(error.ok()); GPR_ASSERT(response.status == 200); GPR_ASSERT(response.body_length == strlen(expect)); GPR_ASSERT(0 == memcmp(expect, response.body, response.body_length)); diff --git a/test/core/http/httpscli_test.cc b/test/core/http/httpscli_test.cc index 82d35509143..56cec9d1522 100644 --- a/test/core/http/httpscli_test.cc +++ b/test/core/http/httpscli_test.cc @@ -161,10 +161,10 @@ void OnFinish(void* arg, grpc_error_handle error) { const char* expect = "Hello world!" "

This is a test

"; - GPR_ASSERT(error.ok()); grpc_http_response response = request_state->response; gpr_log(GPR_INFO, "response status=%d error=%s", response.status, grpc_core::StatusToString(error).c_str()); + GPR_ASSERT(error.ok()); GPR_ASSERT(response.status == 200); GPR_ASSERT(response.body_length == strlen(expect)); GPR_ASSERT(0 == memcmp(expect, response.body, response.body_length));