Skip to content

Commit c1b15a9

Browse files
test(shared-log): tolerate syncInFlight peers in getCover
1 parent 88b12bb commit c1b15a9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/programs/data/shared-log/test/replication.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1557,7 +1557,9 @@ testSetups.forEach((setup) => {
15571557
db2.node.identity.publicKey.hashcode(),
15581558
db3.node.identity.publicKey.hashcode(),
15591559
]).include(unionFromPeer0[selfIndex === 0 ? 1 : 0]);
1560-
expect(unionFromPeer0).to.have.length(2);
1560+
// `getCover` can include extra peers due to ongoing background sync (syncInFlight),
1561+
// which is timing-dependent and tends to happen more often for the u64 IBLT synchronizer.
1562+
expect(unionFromPeer0).to.have.length.within(2, 3);
15611563

15621564
// the other ones should only have to cover themselves
15631565
await Promise.all(

0 commit comments

Comments
 (0)