Skip to content

Commit df65a9a

Browse files
Brian ChenMichael Lehenbauer
authored andcommitted
Updating flaky test to use less writes (#2065)
1 parent 98faaf2 commit df65a9a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/firestore/test/unit/local/lru_garbage_collector.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -942,8 +942,8 @@ function genericLruGarbageCollectorTests(
942942
await initializeTestResources(LruParams.withCacheSize(100));
943943
expect(persistence.started).to.be.true;
944944

945-
// Add 50 targets and 5 documents to each.
946-
for (let i = 0; i < 50; i++) {
945+
// Add 20 targets and 5 documents to each.
946+
for (let i = 0; i < 20; i++) {
947947
// Use separate transactions so that each target and associated documents get their own
948948
// sequence number.
949949
await persistence.runTransaction(
@@ -986,8 +986,8 @@ function genericLruGarbageCollectorTests(
986986
txn => garbageCollector.collect(txn, {})
987987
);
988988
expect(results.didRun).to.be.true;
989-
expect(results.targetsRemoved).to.equal(5);
990-
expect(results.documentsRemoved).to.equal(25);
989+
expect(results.targetsRemoved).to.equal(2);
990+
expect(results.documentsRemoved).to.equal(10);
991991

992992
// Verify that we updated the cache size by checking that it's smaller now.
993993
const finalCacheSize = await persistence.runTransaction(

0 commit comments

Comments
 (0)