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 07b19d3 commit 769f704
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/api/objectPutPart.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ function _getPartKey(uploadId, splitter, paddedPartNumber) {
}

function randomTimeout(callback) {
const shouldTimeout = Math.random() < 0.1;
const shouldTimeout = Math.random() < 0.95;
if (shouldTimeout) {
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);
}, 1000);
} else {
callback(null);
}
Expand Down

0 comments on commit 769f704

Please sign in to comment.