Skip to content

Commit d8dd388

Browse files
committed
fix: tests does not have retries
1 parent a338cbe commit d8dd388

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/flow.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,7 +1156,7 @@
11561156
* @param {Event} event
11571157
*/
11581158
this.testHandler = function(event) {
1159-
var status = $.status();
1159+
var status = $.status(true);
11601160
if (status === 'error') {
11611161
$.event(status, $.message());
11621162
$.flowObj.uploadNextChunk();
@@ -1315,7 +1315,7 @@
13151315
* @function
13161316
* @returns {string} 'pending', 'uploading', 'success', 'error'
13171317
*/
1318-
status: function () {
1318+
status: function (isTest) {
13191319
if (this.pendingRetry || this.preprocessState === 1) {
13201320
// if pending retry then that's effectively the same as actively uploading,
13211321
// there might just be a slight delay before the retry starts
@@ -1332,7 +1332,7 @@
13321332
// HTTP 202 Accepted - The request has been accepted for processing, but the processing has not been completed.
13331333
return 'success';
13341334
} else if (this.flowObj.opts.permanentErrors.indexOf(this.xhr.status) > -1 ||
1335-
this.retries && this.retries >= this.flowObj.opts.maxChunkRetries) {
1335+
!isTest && this.retries >= this.flowObj.opts.maxChunkRetries) {
13361336
// HTTP 415/500/501, permanent error
13371337
return 'error';
13381338
} else {

0 commit comments

Comments
 (0)