Test disabling concurrency

This commit is contained in:
Dave Hadka 2020-05-08 12:05:32 -04:00
parent aced43a650
commit 6efe05572d
3 changed files with 36 additions and 32 deletions

View File

@ -2403,7 +2403,8 @@ function uploadFile(httpClient, cacheId, archivePath) {
core.debug("Awaiting all uploads"); core.debug("Awaiting all uploads");
let offset = 0; let offset = 0;
try { try {
yield Promise.all(parallelUploads.map(() => __awaiter(this, void 0, void 0, function* () { // await Promise.all(
// parallelUploads.map(async () => {
while (offset < fileSize) { while (offset < fileSize) {
const chunkSize = Math.min(fileSize - offset, MAX_CHUNK_SIZE); const chunkSize = Math.min(fileSize - offset, MAX_CHUNK_SIZE);
const start = offset; const start = offset;
@ -2416,7 +2417,8 @@ function uploadFile(httpClient, cacheId, archivePath) {
autoClose: false autoClose: false
}), start, end); }), start, end);
} }
}))); // })
// );
} }
finally { finally {
fs.closeSync(fd); fs.closeSync(fd);

6
dist/save/index.js vendored
View File

@ -2403,7 +2403,8 @@ function uploadFile(httpClient, cacheId, archivePath) {
core.debug("Awaiting all uploads"); core.debug("Awaiting all uploads");
let offset = 0; let offset = 0;
try { try {
yield Promise.all(parallelUploads.map(() => __awaiter(this, void 0, void 0, function* () { // await Promise.all(
// parallelUploads.map(async () => {
while (offset < fileSize) { while (offset < fileSize) {
const chunkSize = Math.min(fileSize - offset, MAX_CHUNK_SIZE); const chunkSize = Math.min(fileSize - offset, MAX_CHUNK_SIZE);
const start = offset; const start = offset;
@ -2416,7 +2417,8 @@ function uploadFile(httpClient, cacheId, archivePath) {
autoClose: false autoClose: false
}), start, end); }), start, end);
} }
}))); // })
// );
} }
finally { finally {
fs.closeSync(fd); fs.closeSync(fd);

View File

@ -342,8 +342,8 @@ async function uploadFile(
let offset = 0; let offset = 0;
try { try {
await Promise.all( // await Promise.all(
parallelUploads.map(async () => { // parallelUploads.map(async () => {
while (offset < fileSize) { while (offset < fileSize) {
const chunkSize = Math.min( const chunkSize = Math.min(
fileSize - offset, fileSize - offset,
@ -367,8 +367,8 @@ async function uploadFile(
end end
); );
} }
}) // })
); // );
} finally { } finally {
fs.closeSync(fd); fs.closeSync(fd);
} }