face: increase tolerance in WebSocketChannel test

Face/TestWebSocketChannel/SetPingInterval now allows 80ms
absolute tolerance, so that the test case is more stable on
slower machines.

refs #4244

Change-Id: I897f3b33a0ea2eb9006f0dd8d70ef2a4624953e2
This commit is contained in:
Junxiao Shi
2017-09-15 03:26:08 +00:00
parent 042a331582
commit cfe81d5098
+2 -2
View File
@@ -287,13 +287,13 @@ BOOST_AUTO_TEST_CASE(RemoteClose)
BOOST_AUTO_TEST_CASE(SetPingInterval)
{
auto pingInterval = time::milliseconds(300);
const time::milliseconds pingInterval(800);
auto address = getTestIp<AddressFamily::V4>(LoopbackAddress::Yes);
SKIP_IF_IP_UNAVAILABLE(address);
this->initialize(address, pingInterval, time::milliseconds(1000));
BOOST_CHECK_EQUAL(limitedIo.run(2, // clientHandlePing
time::seconds(1)), LimitedIo::EXCEED_OPS);
pingInterval * 3), LimitedIo::EXCEED_OPS);
BOOST_CHECK_LE(measuredPingInterval, pingInterval * 1.1);
BOOST_CHECK_GE(measuredPingInterval, pingInterval * 0.9);
}