diff options
author | ncteisen <ncteisen@gmail.com> | 2018-06-07 12:55:15 -0700 |
---|---|---|
committer | ncteisen <ncteisen@gmail.com> | 2018-06-07 12:55:15 -0700 |
commit | d23739eda3081a274fad4f3a6af400fbca39dee1 (patch) | |
tree | 6a2e36bc6f4190a60b51762513ea5b4c20207baf /test/core/channel | |
parent | c845ba66f30c44120f80098774652ba644ed7652 (diff) |
Reviewer feedback
Diffstat (limited to 'test/core/channel')
-rw-r--r-- | test/core/channel/channelz_test.cc | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/test/core/channel/channelz_test.cc b/test/core/channel/channelz_test.cc index 1c676e51cf..537f1c5b18 100644 --- a/test/core/channel/channelz_test.cc +++ b/test/core/channel/channelz_test.cc @@ -151,32 +151,27 @@ TEST_P(ChannelzChannelTest, BasicChannelAPIFunctionality) { ValidateChannel(channelz_channel, {3, 3, 3}); } -TEST_P(ChannelzChannelTest, LastCallStartedTimestamp) { +TEST_P(ChannelzChannelTest, LastCallStartedMillis) { grpc_core::ExecCtx exec_ctx; ChannelFixture channel(GetParam()); intptr_t uuid = grpc_channel_get_uuid(channel.channel()); Channel* channelz_channel = ChannelzRegistry::Get<Channel>(uuid); - // start a call to set the last call started timestamp channelz_channel->RecordCallStarted(); grpc_millis millis1 = GetLastCallStartedMillis(channelz_channel); - // time gone by should not affect the timestamp ChannelzSleep(100); grpc_millis millis2 = GetLastCallStartedMillis(channelz_channel); EXPECT_EQ(millis1, millis2); - // calls succeeded or failed should not affect the timestamp ChannelzSleep(100); channelz_channel->RecordCallFailed(); channelz_channel->RecordCallSucceeded(); grpc_millis millis3 = GetLastCallStartedMillis(channelz_channel); EXPECT_EQ(millis1, millis3); - // another call started should affect the timestamp // sleep for extra long to avoid flakes (since we cache Now()) ChannelzSleep(5000); - grpc_core::ExecCtx::Get()->InvalidateNow(); channelz_channel->RecordCallStarted(); grpc_millis millis4 = GetLastCallStartedMillis(channelz_channel); EXPECT_NE(millis1, millis4); |