Skip to content

Commit

Permalink
[JENKINS-11952] Wait for ADB start to complete before starting the em…
Browse files Browse the repository at this point in the history
…ulator
  • Loading branch information
oldelvet authored and orrc committed Oct 20, 2014
1 parent 4572745 commit 3cbe818
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -302,6 +302,7 @@ private Environment doSetUp(final AbstractBuild<?, ?> build, final Launcher laun
// We manually start the adb-server so that later commands will not have to start it,
// allowing them to complete faster.
Proc adbStart = emu.getToolProcStarter(Tool.ADB, "start-server").stdout(logger).start();
adbStart.joinWithTimeout(5L, TimeUnit.SECONDS, listener);

// Determine whether we need to create the first snapshot
final SnapshotState snapshotState;
Expand Down Expand Up @@ -347,7 +348,6 @@ private Environment doSetUp(final AbstractBuild<?, ?> build, final Launcher laun

// Give the emulator process a chance to initialise
Thread.sleep(5 * 1000);
adbStart.joinWithTimeout(5L, TimeUnit.SECONDS, listener);

// Check whether a failure was reported on stdout
if (emulatorOutput.toString().contains("image is used by another emulator")) {
Expand Down

0 comments on commit 3cbe818

Please sign in to comment.