Use LOG_IF(FATAL, ...) instead of gpr_assertion_failed() in interop_client.cc

gpr_assertion_failed() will be deprecated soon.

LOG_IF(FATAL, condition) will terminate if condition is true.

PiperOrigin-RevId: 636770885
pull/36702/head
Tanvi Jagtap 9 months ago committed by Copybara-Service
parent fe817c8ab1
commit d148728588
  1. 5
      test/cpp/interop/interop_client.cc

@ -35,7 +35,6 @@
#include <grpc/grpc.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include <grpc/support/time.h>
#include <grpcpp/channel.h>
@ -997,9 +996,7 @@ bool InteropClient::DoOrcaPerRpc() {
CHECK(report.has_value());
CHECK(report->has_value());
auto comparison_result = OrcaLoadReportsDiff(report->value(), *orca_report);
if (comparison_result.has_value()) {
gpr_assertion_failed(__FILE__, __LINE__, comparison_result->c_str());
}
LOG_IF(FATAL, comparison_result.has_value()) << comparison_result->c_str();
CHECK(!load_report_tracker_.GetNextLoadReport().has_value());
VLOG(2) << "orca per rpc successfully finished";
return true;

Loading…
Cancel
Save