src/main/java/org/jenkinsci/plugins/awsdevicefarm/AWSDeviceFarmTestResultAction.java
public void waitForRunCompletion(AWSDeviceFarm adf, ScheduleRunResult runResult, TaskListener listener) throws InterruptedException {
        PrintStream log = listener.getLogger();
        while (true) {
            GetRunResult latestRunResult = adf.describeRun(runResult.getRun().getArn());
            Run run = latestRunResult.getRun();
            result = new AWSDeviceFarmTestResult(owner, run);
            writeToLog(log, String.format("Run %s status %s", run.getName(), run.getStatus()));
            if (result.isCompleted()) {
                break;
            }
            try {
                Thread.sleep(DefaultUpdateInterval);
            } catch (InterruptedException ex) {
                writeToLog(log, String.format("Thread interrupted while waiting for the Run to complete"));
                throw ex;
            }
        }
    }
/**
     * Blocking function which periodically polls the given AWS Device Farm run until its completed. During this waiting period,
     * we will grab the latest results reported by Device Farm and updated our internal result "snapshot" which will be used
     * to populate/inform the UI of test results/progress.
     *
     * @param runResult
     */
Blocking function which periodically polls the given AWS Device Farm run until its completed. During this waiting period,
we will grab the latest results reported by Device Farm and updated our internal result "snapshot" which will be used
to populate/inform the UI of test results/progress.

@param runResult
Blocking function which periodically polls the given AWS Device Farm run until its completed . During this waiting period we will grab the latest results reported by Device Farm and updated our internal result " snapshot " which will be used to populate / inform the UI of test results / progress . @param runResult
public void waitForRunCompletion(AWSDeviceFarm adf, ScheduleRunResult runResult, TaskListener listener) throws InterruptedException {
        PrintStream log = listener.getLogger();
        while (true) {
            GetRunResult latestRunResult = adf.describeRun(runResult.getRun().getArn());
            Run run = latestRunResult.getRun();
            result = new AWSDeviceFarmTestResult(owner, run);
            writeToLog(log, String.format("Run %s status %s", run.getName(), run.getStatus()));
            if (result.isCompleted()) {
                break;
            }
            try {
                Thread.sleep(DefaultUpdateInterval);
            } catch (InterruptedException ex) {
                writeToLog(log, String.format("Thread interrupted while waiting for the Run to complete"));
                throw ex;
            }
        }
    }
public void waitForRunCompletion ( AWSDeviceFarm adf , ScheduleRunResult runResult , TaskListener listener ) throws InterruptedException { PrintStream log = listener . getLogger ( ) ; while ( true ) { GetRunResult latestRunResult = adf . describeRun ( runResult . getRun ( ) . getArn ( ) ) ; Run run = latestRunResult . getRun ( ) ; result = new AWSDeviceFarmTestResult ( owner , run ) ; writeToLog ( log , String . format ( "Run %s status %s" , run . getName ( ) , run . getStatus ( ) ) ) ; if ( result . isCompleted ( ) ) { break ; } try { Thread . sleep ( DefaultUpdateInterval ) ; } catch ( InterruptedException ex ) { writeToLog ( log , String . format ( "Thread interrupted while waiting for the Run to complete" ) ) ; throw ex ; } } }
Blocking function which periodically polls the given AWS Device Farm run until its completed.
Blocking function which periodically polls the given AWS Device Farm run until its completed .