Skip to content

Commit

Permalink
test(snapstore): tolerate a range of compressed file sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
dckc committed Feb 15, 2021
1 parent 62f9ca5 commit 09b7eab
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/SwingSet/test/workers/test-snapstore.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ test('bootstrap, save, compress', async t => {

const snapSize = {
raw: 1096,
compressed: 190,
compressed: 195,
};

const h = await store.save(async snapFile => {
Expand All @@ -102,7 +102,10 @@ test('bootstrap, save, compress', async t => {
);

const zfile = path.resolve(pool, `${h}.gz`);
t.is(Kb(zfile), snapSize.compressed, 'compressed snapshots are smaller');
t.truthy(
Kb(zfile) <= snapSize.compressed,
'compressed snapshots are smaller',
);
});

test('create, save, restore, resume', async t => {
Expand Down

0 comments on commit 09b7eab

Please sign in to comment.