You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by al...@apache.org on 2016/12/06 11:00:57 UTC

cordova-paramedic git commit: CB-12209 Properly handle app uninstall timeout

Repository: cordova-paramedic
Updated Branches:
  refs/heads/master 5dea2407f -> 4ac87e0e8


CB-12209 Properly handle app uninstall timeout


Project: http://git-wip-us.apache.org/repos/asf/cordova-paramedic/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-paramedic/commit/4ac87e0e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-paramedic/tree/4ac87e0e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-paramedic/diff/4ac87e0e

Branch: refs/heads/master
Commit: 4ac87e0e8d5e27017f2943aa36e62b000102d7be
Parents: 5dea240
Author: Alexander Sorokin <al...@akvelon.com>
Authored: Mon Dec 5 13:52:18 2016 +0300
Committer: Alexander Sorokin <al...@akvelon.com>
Committed: Mon Dec 5 18:10:04 2016 +0300

----------------------------------------------------------------------
 lib/ParamedicAppUninstall.js |  5 ++++-
 lib/paramedic.js             | 10 +++++++---
 2 files changed, 11 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-paramedic/blob/4ac87e0e/lib/ParamedicAppUninstall.js
----------------------------------------------------------------------
diff --git a/lib/ParamedicAppUninstall.js b/lib/ParamedicAppUninstall.js
index b0954c0..8188cc3 100644
--- a/lib/ParamedicAppUninstall.js
+++ b/lib/ParamedicAppUninstall.js
@@ -84,7 +84,10 @@ ParamedicAppUninstall.prototype.executeUninstallCommand = function (uninstallCom
                 reject();
             }
         }, {silent: false, async: true});
-    }).timeout(60000, 'Uninstall timed out');
+    }).timeout(60000)
+    .fail(function () {
+        logger.warn('cordova-paramedic: App uninstall timed out!');
+    });
 };
 
 module.exports = ParamedicAppUninstall;

http://git-wip-us.apache.org/repos/asf/cordova-paramedic/blob/4ac87e0e/lib/paramedic.js
----------------------------------------------------------------------
diff --git a/lib/paramedic.js b/lib/paramedic.js
index 9fda944..29f56c5 100644
--- a/lib/paramedic.js
+++ b/lib/paramedic.js
@@ -103,13 +103,17 @@ ParamedicRunner.prototype.run = function () {
         if (self.config.getAction() !== 'build' && !self.config.shouldUseSauce()) {
             self.collectDeviceLogs();
             return self.uninstallApp()
-                // do not fail if uninstall fails
-                .fin(function() {
+                .fail(function () {
+                    // do not fail if uninstall fails
+                })
+                .fin(function () {
                     self.killEmulatorProcess();
-                    self.cleanUpProject();
                 });
         }
         return self.displaySauceDetails();
+    })
+    .fin(function () {
+        self.cleanUpProject();
     });
 };
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org