cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sgreb...@apache.org
Subject cordova-plugin-file git commit: CB-8844 Increased timeout for asset tests
Date Wed, 27 May 2015 14:00:40 GMT
Repository: cordova-plugin-file
Updated Branches:
  refs/heads/master 597e2d454 -> 00e00b07f


CB-8844 Increased timeout for asset tests

github close #116


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

Branch: refs/heads/master
Commit: 00e00b07f191130d3adc54358645e93baf31a5c3
Parents: 597e2d4
Author: alsorokin <alexander.sorokin@akvelon.com>
Authored: Thu May 21 11:23:49 2015 +0300
Committer: sgrebnov <v-segreb@microsoft.com>
Committed: Wed May 27 17:00:18 2015 +0300

----------------------------------------------------------------------
 tests/tests.js | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/00e00b07/tests/tests.js
----------------------------------------------------------------------
diff --git a/tests/tests.js b/tests/tests.js
index b8a3c95..987719a 100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@ -30,6 +30,9 @@ exports.defineAutoTests = function () {
     var isIndexedDBShim = isBrowser && !isChrome;   // Firefox and IE for example
 
     var isWindows = (cordova.platformId === "windows" || cordova.platformId === "windows8");
+    
+    var MEDIUM_TIMEOUT = 15000;
+    var LONG_TIMEOUT = 60000;
 
     describe('File API', function () {
         // Adding a Jasmine helper matcher, to report errors when comparing to FileError
better.
@@ -3456,7 +3459,7 @@ exports.defineAutoTests = function () {
             describe('asset: URLs', function() {
                 it("file.spec.141 filePaths.applicationStorage", function() {
                     expect(cordova.file.applicationDirectory).toEqual('file:///android_asset/');
-                });
+                }, MEDIUM_TIMEOUT);
                 it("file.spec.142 assets should be enumerable", function(done) {
                     resolveLocalFileSystemURL('file:///android_asset/www/', function(entry)
{
                         var reader = entry.createReader();
@@ -3465,7 +3468,7 @@ exports.defineAutoTests = function () {
                             done();
                         }, failed.bind(null, done, 'reader.readEntries - Error during reading
of entries from assets directory'));
                     }, failed.bind(null, done, 'resolveLocalFileSystemURL failed for assets'));
-                });
+                }, LONG_TIMEOUT);
                 it("file.spec.143 copyTo: asset -> temporary", function(done) {
                     var file2 = "entry.copy.file2b",
                     fullPath = joinURL(temp_root.fullPath, file2),
@@ -3488,7 +3491,7 @@ exports.defineAutoTests = function () {
                     temp_root.getFile(file2, {}, function (entry) {
                         entry.remove(transfer, failed.bind(null, done, 'entry.remove - Error
removing file: ' + file2));
                     }, transfer);
-                });
+                }, MEDIUM_TIMEOUT);
             });
             it("file.spec.144 copyTo: asset directory", function (done) {
                 var srcUrl = 'file:///android_asset/www/plugins/cordova-plugin-file';
@@ -3523,7 +3526,7 @@ exports.defineAutoTests = function () {
                         }, failed.bind(null, done, 'directory.copyTo - Error copying directory'));
                     }, failed.bind(null, done, 'resolving src dir'));
                 }, failed.bind(null, done, 'deleteEntry - Error removing directory : ' +
dstDir));
-            });
+            }, LONG_TIMEOUT);
         }
     });
 


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


Mime
View raw message