[ 
https://issues.apache.org/jira/browse/CB-10433?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15145660#comment-15145660
 ] 

ASF GitHub Bot commented on CB-10433:
-------------------------------------

Github user dblotsky commented on a diff in the pull request:

    https://github.com/apache/cordova-medic/pull/76#discussion_r52818827
  
    --- Diff: medic/medic-run.js ---
    @@ -404,26 +459,51 @@ function main() {
             }
     
             // run the code
    -        // NOTE:
    -        //      this is ASYNCHRONOUS
             util.medicLog("running:");
             util.medicLog("    " + runCommandDevice);
    -        shelljs.exec(runCommandDevice, {silent: false, async: true}, 
function (returnCode, output) {
    -            if (failedBecauseNoDevice(output)) {
    -                util.medicLog("no device found, so switching to emulator");
    +        var runDeviceResult = shelljs.exec(runCommandDevice, {silent: 
false, async: false});
    +
    +        if (failedBecauseNoDevice(runDeviceResult.output)) {
    +            util.medicLog("no device found, so switching to emulator");
    +
    +            // Because the Android emulator script uses promises, we need 
to
    +            // abstract the run step into a function
    +            var runOnEmulator = function() {
                     util.medicLog("running:");
                     util.medicLog("    " + runCommandEmulator);
    -                shelljs.exec(runCommandEmulator, {silent: false, async: 
true}, function (returnCode, output) {
    -                    if (cordovaReturnedError(returnCode, output)) {
    -                        util.fatal("running on emulator failed");
    +
    +                var runEmulatorResult = shelljs.exec(runCommandEmulator, 
{silent: false, async: false});
    +                if (cordovaReturnedError(runEmulatorResult.code, 
runEmulatorResult.output)) {
    +                    util.fatal("running on emulator failed");
    +                } else {
    +                    startPollingForTestResults(couchdbURI, buildId, 
timeout);
    +                }
    +            };
    +
    +            if (platform === util.ANDROID) {
    +                // We need to start the emulator first. We can't use 
"cordova run"
    --- End diff --
    
    Nitpick: please add a blank line before comments.


> Timeout when tests don't run
> ----------------------------
>
>                 Key: CB-10433
>                 URL: https://issues.apache.org/jira/browse/CB-10433
>             Project: Apache Cordova
>          Issue Type: Test
>          Components: mobile-spec
>            Reporter: Sarangan Rajamanickam
>            Assignee: Richard B Knoll
>              Labels: found-by-ci, ios, triaged, windows-store-8.1, wp8.1
>
> During the Apache CI Build, there are several instances where mobilespec 
> tests don't run for whatever reason and the logging message we see is 
> misleading, we should fix it.
> Some of the links are:
> 1. https://ci.apache.org/builders/cordova-ios/builds/1534
> 2. https://ci.apache.org/builders/cordova-ios/builds/1543
> 3. https://ci.apache.org/builders/cordova-ios/builds/1553
> 4. https://ci.apache.org/builders/cordova-ios/builds/1570
> 5. https://ci.apache.org/builders/cordova-windows-phone8.1/builds/1402
> Noticed this error majority of the times in iOS. But, today (01/25) happened 
> in WP8.1 also. 
> ==
> Content for logs:
> .query failed for mobilespec_results { [Error: connect ETIMEDOUT] code: 
> 'ETIMEDOUT', errno: 'ETIMEDOUT', syscall: 'connect' }
> .........query failed for mobilespec_results { [Error: connect ETIMEDOUT] 
> code: 'ETIMEDOUT', errno: 'ETIMEDOUT', syscall: 'connect' }
> .................................................query failed for 
> mobilespec_results { [Error: connect ETIMEDOUT] code: 'ETIMEDOUT', errno: 
> 'ETIMEDOUT', syscall: 'connect' }
> .....................................query failed for mobilespec_results { 
> [Error: connect ETIMEDOUT] code: 'ETIMEDOUT', errno: 'ETIMEDOUT', syscall: 
> 'connect' }
> ............................................................................query
>  failed for mobilespec_results { [Error: connect ETIMEDOUT] code: 
> 'ETIMEDOUT', errno: 'ETIMEDOUT', syscall: 'connect' }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to