From c9fc1da595d4e13cddf232da8456a9077a00140e Mon Sep 17 00:00:00 2001 From: Jonathan Lipps Date: Wed, 19 Mar 2014 23:44:04 -0700 Subject: [PATCH 1/2] bring back mobile reset --- lib/appium.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/appium.js b/lib/appium.js index 124d7c8e4..4accbee70 100644 --- a/lib/appium.js +++ b/lib/appium.js @@ -372,10 +372,7 @@ Appium.prototype.reset = function (cb) { this.device.fastReset(function (err) { jwpResponse(err, cb); }); - } else if (!this.args.fastReset && - typeof this.device.fullReset === "function") { - logger.info("Running full reset on device"); - } else if (!this.args.fastReset) { + } else { logger.info("Running generic full reset"); var oldImpWait = this.device.implicitWaitMs , oldCommandTimeoutMs = this.commandTimeoutMs @@ -392,9 +389,6 @@ Appium.prototype.reset = function (cb) { this.setCommandTimeout(oldCommandTimeoutMs / 1000, cb); }.bind(this)); }.bind(this)); - } else { - logger.warn("No reset strategy available"); - jwpResponse(cb); } }; From 22912968d8c40b9d06e548ff8f4a2ea5ea65e232 Mon Sep 17 00:00:00 2001 From: Jonathan Lipps Date: Thu, 20 Mar 2014 00:01:30 -0700 Subject: [PATCH 2/2] fix fastReset going undefined between sessions (fix #2087) --- lib/appium.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/appium.js b/lib/appium.js index 4accbee70..452167411 100644 --- a/lib/appium.js +++ b/lib/appium.js @@ -24,6 +24,7 @@ var DT_IOS = "ios" var Appium = function (args) { this.args = args; + this.args.fastReset = !this.args.fullReset && !this.args.noReset; this.serverArgs = _.clone(args); this.rest = null; this.webSocket = null; @@ -34,8 +35,6 @@ var Appium = function (args) { this.oldDesiredCapabilities = {}; this.session = null; this.preLaunched = false; - this.fastReset = !this.args.fullReset && !this.args.noReset; - this.args.fastReset = this.fastReset; this.sessionOverride = this.args.sessionOverride; this.resetting = false; this.defCommandTimeoutMs = this.args.defaultCommandTimeout * 1000;