Commit facc6aef authored by Jay Civelli's avatar Jay Civelli Committed by Commit Bot

Fix flakyness in ChildProcessLauncherTest.testPendingSpawnQueue

The ChildProcessLauncherTest.testPendingSpawnQueue test accesses a
service without waiting for it to be bound.
In some cases it seemed it would be accessed before it was bound, the
IBinder interface was not set and we would get a NPE calling
crashServiceForTesting on it.

Bug: 740644
Change-Id: If099fde3042cc0307366384ef8adf0af003ce1cf
Reviewed-on: https://chromium-review.googlesource.com/565009Reviewed-by: default avatarBo Liu <boliu@chromium.org>
Commit-Queue: Jay Civelli <jcivelli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#485409}
parent ac2e9a9d
...@@ -507,6 +507,9 @@ public class ChildProcessLauncherTest { ...@@ -507,6 +507,9 @@ public class ChildProcessLauncherTest {
Assert.assertNull(createChildProcessLauncher(mConnectionAllocator, Assert.assertNull(createChildProcessLauncher(mConnectionAllocator,
true /* setupConnection */, false /* queueIfNoFreeConnection */)); true /* setupConnection */, false /* queueIfNoFreeConnection */));
waitForConnectionState(connections[0], CONNECTION_BLOCK_UNTIL_SETUP);
waitForConnectionState(connections[1], CONNECTION_BLOCK_UNTIL_SETUP);
// Stop one connection, that should free-up a connection and the first queued launcher // Stop one connection, that should free-up a connection and the first queued launcher
// should use it. // should use it.
stopLauncher(launchers[0]); stopLauncher(launchers[0]);
......
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