aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/channel/channelz_registry_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/core/channel/channelz_registry_test.cc')
-rw-r--r--test/core/channel/channelz_registry_test.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/core/channel/channelz_registry_test.cc b/test/core/channel/channelz_registry_test.cc
index eb6305eb4e..24e50933d7 100644
--- a/test/core/channel/channelz_registry_test.cc
+++ b/test/core/channel/channelz_registry_test.cc
@@ -82,6 +82,15 @@ TEST(ChannelzRegistryTest, MultipleTypeTest) {
EXPECT_EQ(&str_to_register, retrieved_str);
}
+TEST(ChannelzRegistryTest, RegisterManyItems) {
+ int object_to_register = 42;
+ for (int i = 0; i < 100; i++) {
+ intptr_t uuid = ChannelzRegistry::Register(&object_to_register);
+ int* retrieved = ChannelzRegistry::Get<int>(uuid);
+ EXPECT_EQ(&object_to_register, retrieved);
+ }
+}
+
namespace {
class Foo {
public: