Enabling IPv6 socket recv timestamp test, and making less flaky.
The test worked by sleeping a certain time, then checking that the
difference between recv timestamps before and after the sleep was
within some margin of the requested sleep time.
However, this means that imprecision of SleepMs makes the test flaky.
This source of flakiness can be removed by comparing to the actual
time slept instead of the requested time.
Also making the margin larger, to further reduce the likelihood of
flakiness.
R=pthatcher@webrtc.org, stefan@webrtc.org
Review URL: https://codereview.webrtc.org/2111043004 .
Cr-Commit-Position: refs/heads/master@{#13733}
diff --git a/webrtc/base/socket_unittest.h b/webrtc/base/socket_unittest.h
index 82b7ea5..8172edd 100644
--- a/webrtc/base/socket_unittest.h
+++ b/webrtc/base/socket_unittest.h
@@ -57,7 +57,8 @@
void TestUdpReadyToSendIPv6();
void TestGetSetOptionsIPv4();
void TestGetSetOptionsIPv6();
- void TestSocketRecvTimestamp();
+ void TestSocketRecvTimestampIPv4();
+ void TestSocketRecvTimestampIPv6();
static const int kTimeout = 5000; // ms
const IPAddress kIPv4Loopback;