Skip to content

Commit

Permalink
reduce number of entires in test batch. ref #113911
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackson Kearl committed Jan 7, 2021
1 parent 2b20162 commit 80f369b
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,9 @@ suite('IndexedDB File Service', function () {
assert.strictEqual(event!.target!.resource.path, resource.path);
}

// Skipped due to failing on build machines where file io pressure is higher.
test.skip('createFile (batched)', async () => {
test('createFile (small batch)', async () => {
// Batched writes take approx .5ms/file, sequenced take approx 10ms/file.
// Testing with 1000 files would take ~10s without batching (exceeds 5s timeout), or 500ms with (well winthin 5s timeout)
const batch = Array.from({ length: 1000 }).map((_, i) => ({ contents: `Hello${i}`, resource: userdataURIFromPaths(['batched', `Hello${i}.txt`]) }));
const batch = Array.from({ length: 50 }).map((_, i) => ({ contents: `Hello${i}`, resource: userdataURIFromPaths(['batched', `Hello${i}.txt`]) }));
const stats = await Promise.all(batch.map(entry => service.createFile(entry.resource, VSBuffer.fromString(entry.contents))));
for (let i = 0; i < stats.length; i++) {
const entry = batch[i];
Expand Down

0 comments on commit 80f369b

Please sign in to comment.