diff options
author | 2018-03-06 07:53:58 -0800 | |
---|---|---|
committer | 2018-03-06 08:01:17 -0800 | |
commit | 1cc064dbfc5fd91a6f705881427b39ca4675abe3 (patch) | |
tree | f160067ec3e1f071f336949100f638c31c77c3ca /test/core/channel | |
parent | 31c05ba668ee6ede5326c669277204a7f778a9ab (diff) |
Reviewer feedback, s/object_registry/channel_trace_registry
Diffstat (limited to 'test/core/channel')
-rw-r--r-- | test/core/channel/channel_trace_test.cc | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/test/core/channel/channel_trace_test.cc b/test/core/channel/channel_trace_test.cc index c0cccb77ac..dcc3a347bf 100644 --- a/test/core/channel/channel_trace_test.cc +++ b/test/core/channel/channel_trace_test.cc @@ -25,7 +25,7 @@ #include <gtest/gtest.h> #include "src/core/lib/channel/channel_trace.h" -#include "src/core/lib/channel/object_registry.h" +#include "src/core/lib/channel/channel_trace_registry.h" #include "src/core/lib/gpr/useful.h" #include "src/core/lib/iomgr/exec_ctx.h" @@ -43,8 +43,7 @@ static void add_simple_trace_event(RefCountedPtr<ChannelTrace> tracer) { // checks for the existence of all the required members of the tracer. static void validate_trace(RefCountedPtr<ChannelTrace> tracer, - size_t expected_num_event_logged, - size_t max_nodes) { + size_t expected_num_event_logged, size_t max_nodes) { if (!max_nodes) return; char* json_str = tracer->RenderTrace(); grpc_json* json = grpc_json_parse_string(json_str); @@ -59,12 +58,9 @@ static void validate_trace_data_matches_uuid_lookup( intptr_t uuid = tracer->GetUuid(); if (uuid == -1) return; // Doesn't make sense to lookup if tracing disabled char* tracer_json_str = tracer->RenderTrace(); - void* object; - grpc_object_registry_type type = - grpc_object_registry_get_object(uuid, &object); - GPR_ASSERT(type == GRPC_OBJECT_REGISTRY_CHANNEL_TRACER); - char* uuid_lookup_json_str = - static_cast<ChannelTrace*>(object)->RenderTrace(); + ChannelTrace* uuid_lookup = + grpc_channel_trace_registry_get_channel_trace(uuid); + char* uuid_lookup_json_str = uuid_lookup->RenderTrace(); GPR_ASSERT(strcmp(tracer_json_str, uuid_lookup_json_str) == 0); gpr_free(tracer_json_str); gpr_free(uuid_lookup_json_str); |