OpenCensusTest: Fix flakiness (#31349)

pull/31388/head
Yash Tibrewal 2 years ago committed by GitHub
parent d1bce5c868
commit 2ffff621a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      test/cpp/ext/filters/census/stats_plugin_end2end_test.cc

@ -169,6 +169,9 @@ class StatsPluginEnd2EndTest : public ::testing::Test {
stub_ = EchoTestService::NewStub(grpc::CreateChannel(
server_address_, grpc::InsecureChannelCredentials()));
// Clear out any previous spans
::opencensus::trace::exporter::SpanExporterTestPeer::ExportForTesting();
}
void ResetStub(std::shared_ptr<Channel> channel) {
@ -659,7 +662,9 @@ TEST_F(StatsPluginEnd2EndTest, TestRetryStatsWithAdditionalRetries) {
::testing::ElementsAre(client_method_name_),
::testing::Property(
&Distribution::mean,
::testing::AllOf(::testing::Ge(50), ::testing::Le(300))))));
::testing::AllOf(
::testing::Ge(50),
::testing::Le(500 * grpc_test_slowdown_factor()))))));
}
}

Loading…
Cancel
Save