Skip to content

Fix flaky integration test #2065

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 8, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -942,8 +942,8 @@ function genericLruGarbageCollectorTests(
await initializeTestResources(LruParams.withCacheSize(100));
expect(persistence.started).to.be.true;

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

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