cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alsoro...@apache.org
Subject cordova-plugin-file-transfer git commit: (tests): Fixed tests' flakiness by increasing the timeouts
Date Wed, 31 May 2017 07:23:43 GMT
Repository: cordova-plugin-file-transfer
Updated Branches:
  refs/heads/master f6621c592 -> 295f742ae


(tests): Fixed tests' flakiness by increasing the timeouts


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/commit/295f742a
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/tree/295f742a
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/diff/295f742a

Branch: refs/heads/master
Commit: 295f742ae840444d3abb113f777063a7abe4a5a8
Parents: f6621c5
Author: Alexander Sorokin <alexander.sorokin@akvelon.com>
Authored: Wed May 31 10:19:44 2017 +0300
Committer: Alexander Sorokin <alexander.sorokin@akvelon.com>
Committed: Wed May 31 10:23:27 2017 +0300

----------------------------------------------------------------------
 tests/tests.js | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/blob/295f742a/tests/tests.js
----------------------------------------------------------------------
diff --git a/tests/tests.js b/tests/tests.js
index 1edab27..c8d9ef3 100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@ -32,9 +32,9 @@ exports.defineAutoTests = function () {
     var GRACE_TIME_DELTA = 600; // in milliseconds
     var DEFAULT_FILESYSTEM_SIZE = 1024 * 50; // filesystem size in bytes
     var UNKNOWN_HOST = "http://foobar.apache.org";
-    var DOWNLOAD_TIMEOUT = 7 * ONE_SECOND;
-    var WINDOWS_UNKNOWN_HOST_TIMEOUT = 35 * ONE_SECOND;
-    var UPLOAD_TIMEOUT = 7 * ONE_SECOND;
+    var DOWNLOAD_TIMEOUT = 15 * ONE_SECOND;
+    var LONG_TIMEOUT = 60 * ONE_SECOND;
+    var UPLOAD_TIMEOUT = 15 * ONE_SECOND;
     var ABORT_DELAY = 100; // for abort() tests
     var LATIN1_SYMBOLS = '¥§©ÆÖÑøøø¼';
     var DATA_URI_PREFIX = "data:image/png;base64,";
@@ -550,7 +550,7 @@ exports.defineAutoTests = function () {
                     };
 
                     specContext.transfer.download(fileURL, specContext.localFilePath, downloadWin,
downloadFail);
-                }, DOWNLOAD_TIMEOUT);
+                }, isWindows ? LONG_TIMEOUT : DOWNLOAD_TIMEOUT);
 
                 it("filetransfer.spec.11 should call the error callback on abort()", function
(done) {
                     var fileURL = "http://cordova.apache.org/downloads/BlueZedEx.mp3";
@@ -604,7 +604,7 @@ exports.defineAutoTests = function () {
                     spyOn(specContext.transfer, "onprogress").and.callThrough();
 
                     specContext.transfer.download(fileURL, specContext.localFilePath, downloadWin,
downloadFail);
-                }, DOWNLOAD_TIMEOUT);
+                }, isWindows ? LONG_TIMEOUT : DOWNLOAD_TIMEOUT);
 
                 it("filetransfer.spec.10 should be stopped by abort()", function (done) {
                     var fileURL = "http://cordova.apache.org/downloads/BlueZedEx.mp3";
@@ -724,7 +724,7 @@ exports.defineAutoTests = function () {
                     this.transfer.onprogress = function () {};
 
                     this.transfer.download(fileURL, this.localFilePath, downloadWin, downloadFail);
-                }, isWindows ? WINDOWS_UNKNOWN_HOST_TIMEOUT : DOWNLOAD_TIMEOUT);
+                }, isWindows ? LONG_TIMEOUT : DOWNLOAD_TIMEOUT);
 
                 it("filetransfer.spec.16 should handle bad file path", function (done) {
                     var fileURL = SERVER;


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


Mime
View raw message