Commit 2490b28c authored by Wez's avatar Wez Committed by Commit Bot

Switch LaunchWithHandleTransfer test to use action_timeout().

This test times-out on Fuchsia bots, seemingly due to an extremely long
delay in getting around to scheduling the sub-process to execute, some
of the time. Other similar ProcessUtilTests succeed because they wait
indefinitely for the sub-process to do its work; raising the timeout
to action_timeout() provides enough head-room that this test passes.

This also has the advantage that the test's timeouts are now
configurable.

Bug: 793412
Change-Id: I8b43e3cadfe302cf8afd9e835ee4ed1fbcda3c9e
Reviewed-on: https://chromium-review.googlesource.com/828383Reviewed-by: default avatarScott Graham <scottmg@chromium.org>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524639}
parent 85b6741b
......@@ -771,8 +771,10 @@ TEST_F(ProcessUtilTest, LaunchWithHandleTransfer) {
// Read from the pipe to verify that the child received it.
zx_signals_t signals = 0;
result = zx_object_wait_one(handles[1], ZX_SOCKET_READABLE,
zx_deadline_after(ZX_SEC(5)), &signals);
result = zx_object_wait_one(
handles[1], ZX_SOCKET_READABLE,
(base::TimeTicks::Now() + TestTimeouts::action_timeout()).ToZxTime(),
&signals);
EXPECT_EQ(ZX_OK, result);
EXPECT_TRUE(signals & ZX_SOCKET_READABLE);
......@@ -786,8 +788,8 @@ TEST_F(ProcessUtilTest, LaunchWithHandleTransfer) {
CHECK_EQ(ZX_OK, zx_handle_close(handles[1]));
int exit_code;
ASSERT_TRUE(
process.WaitForExitWithTimeout(TimeDelta::FromSeconds(5), &exit_code));
ASSERT_TRUE(process.WaitForExitWithTimeout(TestTimeouts::action_timeout(),
&exit_code));
EXPECT_EQ(0, exit_code);
}
#endif // defined(OS_FUCHSIA)
......
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