Skip to content

Commit

Permalink
Fix more tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
rkistner committed Jun 10, 2024
1 parent f6e94a1 commit 7812eab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/service-core/test/src/large_batch.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function defineBatchTests(factory: StorageFactory) {
const checkpoint = await context.getCheckpoint({ timeout: 100_000 });
const duration = Date.now() - start;
const used = Math.round(process.memoryUsage().heapUsed / 1024 / 1024);
const checksum = await context.storage!.getChecksums(checkpoint, ['global[]']);
const checksum = await context.storage!.getChecksums(checkpoint, null, ['global[]']);
expect(checksum[0].count).toEqual(operation_count);
const perSecond = Math.round((operation_count / duration) * 1000);
console.log(`${operation_count} ops in ${duration}ms ${perSecond} ops/s. ${used}MB heap`);
Expand Down Expand Up @@ -100,7 +100,7 @@ function defineBatchTests(factory: StorageFactory) {

const checkpoint = await context.getCheckpoint({ timeout: 100_000 });
const duration = Date.now() - start;
const checksum = await context.storage!.getChecksums(checkpoint, ['global[]']);
const checksum = await context.storage!.getChecksums(checkpoint, null, ['global[]']);
expect(checksum[0].count).toEqual(operation_count);
const perSecond = Math.round((operation_count / duration) * 1000);
console.log(`${operation_count} ops in ${duration}ms ${perSecond} ops/s.`);
Expand Down Expand Up @@ -156,7 +156,7 @@ function defineBatchTests(factory: StorageFactory) {
const checkpoint = await context.getCheckpoint({ timeout: 50_000 });
const duration = Date.now() - start;
const used = Math.round(process.memoryUsage().heapUsed / 1024 / 1024);
const checksum = await context.storage!.getChecksums(checkpoint, ['global[]']);
const checksum = await context.storage!.getChecksums(checkpoint, null, ['global[]']);
expect(checksum[0].count).toEqual(operationCount);
const perSecond = Math.round((operationCount / duration) * 1000);
// This number depends on the test machine, so we keep the test significantly
Expand All @@ -173,7 +173,7 @@ function defineBatchTests(factory: StorageFactory) {
const checkpoint2 = await context.getCheckpoint({ timeout: 20_000 });
const truncateDuration = Date.now() - truncateStart;

const checksum2 = await context.storage!.getChecksums(checkpoint2, ['global[]']);
const checksum2 = await context.storage!.getChecksums(checkpoint2, null, ['global[]']);
const truncateCount = checksum2[0].count - checksum[0].count;
expect(truncateCount).toEqual(numTransactions * perTransaction);
const truncatePerSecond = Math.round((truncateCount / truncateDuration) * 1000);
Expand Down

0 comments on commit 7812eab

Please # to comment.