pull/36396/head
yijiem 7 months ago
parent 997b772e0b
commit 26062ea1b4
  1. 1
      test/core/channel/call_tracer_test.cc
  2. 6
      test/core/util/fake_stats_plugin.h

@ -94,6 +94,7 @@ TEST_F(CallTracerTest, MultipleClientCallAttemptTracers) {
attempt_tracer->RecordAnnotation("Test"); attempt_tracer->RecordAnnotation("Test");
EXPECT_EQ(annotation_logger_, EXPECT_EQ(annotation_logger_,
std::vector<std::string>({"Test", "Test", "Test"})); std::vector<std::string>({"Test", "Test", "Test"}));
attempt_tracer->RecordEnd(gpr_timespec());
} }
TEST_F(CallTracerTest, BasicServerCallTracerTest) { TEST_F(CallTracerTest, BasicServerCallTracerTest) {

@ -115,8 +115,7 @@ class FakeClientCallTracer : public ClientCallTracer {
~FakeClientCallTracer() override {} ~FakeClientCallTracer() override {}
CallAttemptTracer* StartNewAttempt(bool /*is_transparent_retry*/) override { CallAttemptTracer* StartNewAttempt(bool /*is_transparent_retry*/) override {
auto call_attempt_tracer = auto call_attempt_tracer =
grpc_core::MakeRefCounted<FakeClientCallAttemptTracer>( MakeRefCounted<FakeClientCallAttemptTracer>(annotation_logger_);
annotation_logger_);
call_attempt_tracers_.emplace_back(call_attempt_tracer); call_attempt_tracers_.emplace_back(call_attempt_tracer);
return call_attempt_tracer.release(); // Released in RecordEnd(). return call_attempt_tracer.release(); // Released in RecordEnd().
} }
@ -135,8 +134,7 @@ class FakeClientCallTracer : public ClientCallTracer {
private: private:
std::vector<std::string>* annotation_logger_; std::vector<std::string>* annotation_logger_;
std::vector<grpc_core::RefCountedPtr<FakeClientCallAttemptTracer>> std::vector<RefCountedPtr<FakeClientCallAttemptTracer>> call_attempt_tracers_;
call_attempt_tracers_;
}; };
#define GRPC_ARG_INJECT_FAKE_CLIENT_CALL_TRACER_FACTORY \ #define GRPC_ARG_INJECT_FAKE_CLIENT_CALL_TRACER_FACTORY \

Loading…
Cancel
Save