Examples of joinWithTimeout()


Examples of hudson.Proc.joinWithTimeout()

        final AndroidEmulatorContext emu = new AndroidEmulatorContext(build, launcher, listener, androidSdk);

        // 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);
        Proc adbStart2 = emu.getToolProcStarter(Tool.ADB, "start-server").stdout(logger).start();
        adbStart2.joinWithTimeout(5L, TimeUnit.SECONDS, listener);

        // Determine whether we need to create the first snapshot
        final SnapshotState snapshotState;
View Full Code Here

Examples of hudson.Proc.joinWithTimeout()

        // 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);
        Proc adbStart2 = emu.getToolProcStarter(Tool.ADB, "start-server").stdout(logger).start();
        adbStart2.joinWithTimeout(5L, TimeUnit.SECONDS, listener);

        // Determine whether we need to create the first snapshot
        final SnapshotState snapshotState;
        if (useSnapshots && androidSdk.supportsSnapshots()) {
            boolean hasSnapshot = emuConfig.hasExistingSnapshot(launcher, androidSdk);
View Full Code Here

Examples of hudson.Proc.joinWithTimeout()

            while (System.currentTimeMillis() < start + timeout && (ignoreProcess || emu.process().isAlive())) {
                ByteArrayOutputStream stream = new ByteArrayOutputStream(4);

                // Run "getprop", timing-out in case adb hangs
                Proc proc = emu.getProcStarter(bootCheckCmd).stdout(stream).start();
                int retVal = proc.joinWithTimeout(adbTimeout, TimeUnit.MILLISECONDS, emu.launcher().getListener());
                if (retVal == 0) {
                    // If boot is complete, our work here is done
                    String result = stream.toString().trim();
                    if (result.equals("1")) {
                        return true;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.