Skip to content

Commit

Permalink
feat: Asset manager performance (#639)
Browse files Browse the repository at this point in the history
* feat: Increase file sizes in E2E assets tests.

* Use default chunk size.
  • Loading branch information
sea-snake committed Oct 6, 2022
1 parent fc3d3d0 commit 377c496
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions e2e/node/basic/assets.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ describe('assets', () => {
const assetManager = new AssetManager({
canisterId,
agent: await agent,
maxSingleFileSize: 1900,
maxChunkSize: 1900,
});
const readable = randomBytesReadable(fileName, length);
const key = await assetManager.store(readable);
Expand Down Expand Up @@ -86,9 +84,9 @@ describe('assets', () => {
}
});

it('store, get and delete 1KB asset (single chunk)', () => testRandomBytes('1KB.bin', 1000));
it('store, get and delete 1MB asset (single chunk)', () => testRandomBytes('1MB.bin', 1000000));

it('store, get and delete 3KB asset (multiple chunk)', () => testRandomBytes('3KB.bin', 3000));
it('store, get and delete 3MB asset (multiple chunk)', () => testRandomBytes('3MB.bin', 3000000));

it('batch process assets and verify asset list', async () => {
const assetManager = new AssetManager({ canisterId, agent: await agent });
Expand Down

0 comments on commit 377c496

Please sign in to comment.