From 7c4412efd479efafa51b4a300787cdada6a373c3 Mon Sep 17 00:00:00 2001 From: Galvin Hsiu Date: Mon, 22 Jan 2018 01:44:10 -0800 Subject: [PATCH] Ripped out unwanted condition, changed test --- client/js/uploader.basic.api.js | 4 +--- test/unit/chunked-uploads.js | 5 +++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/client/js/uploader.basic.api.js b/client/js/uploader.basic.api.js index c634cc37e..b4c1ad071 100644 --- a/client/js/uploader.basic.api.js +++ b/client/js/uploader.basic.api.js @@ -1576,9 +1576,7 @@ }, _onUploadChunkSuccess: function(id, chunkData) { - var uploadData = this._uploadData.retrieve({id: id}); - - if (!this._preventRetries[id] && this._options.retry.enableAuto && uploadData.status !== qq.status.PAUSED) { + if (!this._preventRetries[id] && this._options.retry.enableAuto) { this._autoRetries[id] = 0; } }, diff --git a/test/unit/chunked-uploads.js b/test/unit/chunked-uploads.js index 92f2392f8..9555ffdee 100644 --- a/test/unit/chunked-uploads.js +++ b/test/unit/chunked-uploads.js @@ -201,8 +201,6 @@ if (qqtest.canDownloadFileAsBlob) { } function testChunkedEveryFailureAndRecovery(done) { - assert.expect(6 + (expectedChunks * 17) + (expectedChunks * 6), done); - var alreadyFailed = false, uploader = new qq.FineUploaderBasic({ request: { @@ -268,6 +266,9 @@ if (qqtest.canDownloadFileAsBlob) { assert.equal(expectedChunks, chunksSent, "Wrong # of chunks sent."); assert.equal(expectedChunks, chunksSucceeded, "Wrong # of chunks succeeded"); assert.equal(response.testParam, "testVal"); + assert.equal(response.success, true); + + done(); } } }),