Skip to content

Commit

Permalink
random timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
benzekrimaha committed Jul 25, 2024
1 parent 5063d87 commit 07b19d3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/api/objectPutPart.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function _getPartKey(uploadId, splitter, paddedPartNumber) {
function randomTimeout(callback) {
const shouldTimeout = Math.random() < 0.1;
if (shouldTimeout) {
console.log("Simulating a timeout");
console.log('Simulating a timeout');

Check failure on line 44 in lib/api/objectPutPart.js

View workflow job for this annotation

GitHub Actions / linting-coverage

Unexpected console statement
setTimeout(() => {
callback(errors.InternalError);
}, 5000);
Expand Down Expand Up @@ -447,6 +447,7 @@ function objectPutPart(authInfo, request, streamingV4Params, log,
return cb(null, hexDigest, corsHeaders);
});
});
return null;
}

module.exports = objectPutPart;

0 comments on commit 07b19d3

Please sign in to comment.