Commit 9bdad870 authored by Joe Downing's avatar Joe Downing Committed by Commit Bot

Updating the timeout for SecurityKeyIpcServerTest

The SecurityKeyResponseTimeout test is flaky on MacOS
as the timeout observed can vary by a couple hundred
milliseconds which makes the test flaky.  The original
timeout was just a 'sensible' value so we can increase
that value so the test is more consistent.

BUG=933522

Change-Id: I9ca78270c7446760022e97a4b477b6bc7074dcee
Reviewed-on: https://chromium-review.googlesource.com/c/1478253
Commit-Queue: Wez <wez@chromium.org>
Reviewed-by: default avatarWez <wez@chromium.org>
Auto-Submit: Joe Downing <joedow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#633749}
parent bbfbde3e
......@@ -25,6 +25,7 @@ namespace {
const int kTestConnectionId = 42;
const int kInitialConnectTimeoutMs = 250;
const int kConnectionTimeoutErrorDeltaMs = 100;
const int kLargeResponseTimeoutMs = 500;
const int kLargeMessageSizeBytes = 256 * 1024;
} // namespace
......@@ -406,8 +407,7 @@ TEST_F(SecurityKeyIpcServerTest, SecurityKeyResponseTimeout) {
WaitForOperationComplete();
base::TimeDelta elapsed_time = base::Time::NowFromSystemTime() - start_time;
ASSERT_NEAR(elapsed_time.InMilliseconds(), request_timeout.InMilliseconds(),
kConnectionTimeoutErrorDeltaMs);
ASSERT_LT(elapsed_time.InMilliseconds(), kLargeResponseTimeoutMs);
}
TEST_F(SecurityKeyIpcServerTest, SendResponseTimeout) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment