From c65de42f1e0696dd161eb9910759de65aec0d934 Mon Sep 17 00:00:00 2001 From: Yves Gerey Date: Fri, 8 Nov 2019 20:29:04 +0100 Subject: [PATCH] Fix NetworkEmulationManagerTest.ThroughputStats flakiness (again). This CL increases tolerance for time measurement variability, from 1% to 5%. This accounts for heavily loaded bots in CI. Bug: webrtc:10553 Change-Id: I014f856f9e358f2871a2df8bc39ab0995fdc971f Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/159284 Reviewed-by: Artem Titov Commit-Queue: Yves Gerey Cr-Commit-Position: refs/heads/master@{#29765} --- test/network/network_emulation_unittest.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/network/network_emulation_unittest.cc b/test/network/network_emulation_unittest.cc index e661d51c9a..30d02be453 100644 --- a/test/network/network_emulation_unittest.cc +++ b/test/network/network_emulation_unittest.cc @@ -315,7 +315,7 @@ TEST(NetworkEmulationManagerTest, ThroughputStats) { EXPECT_EQ(st.packets_sent, kNumPacketsSent); EXPECT_EQ(st.bytes_sent.bytes(), kSinglePacketSize * kNumPacketsSent); - const double tolerance = 0.99; // Accept 1% tolerance for timing. + const double tolerance = 0.95; // Accept 5% tolerance for timing. EXPECT_GE(st.last_packet_sent_time - st.first_packet_sent_time, TimeDelta::ms((kNumPacketsSent - 1) * kDelayMs * tolerance)); EXPECT_GT(st.AverageSendRate().bps(), 0);