-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
The groupsync test in measurements/perf-matrix.test.ts has two bugs that make it ineffective:
- Tautological assertion: The test asserts expect(members.length).toBe(members.length), which compares a value to itself and will always pass regardless of actual member count.
- Wrong sync perspective: The test measures sync() time from the group creator's client immediately after group creation. Since the creator already has all group data locally, this measures a near-no-op rather than actual network sync performance.
// Current implementation (lines 162-166)it(`groupsync-${i}(${populateSize})[${installationPerMember}]:sync a large group of ${i} members ${i}`, async () => { await newGroup.sync(); // Creator syncing their own just-created group const members = await newGroup.members(); expect(members.length).toBe(members.length); // Always true});
Expected behavior
- The assertion should verify that the member count equals the expected value (i).
- The sync should be measured from a receiver's perspective (a member who wasn't the creator) to capture actual network fetch time for group data.
Steps to reproduce the bug
- Run the performance test suite with BATCH_SIZE=10
- Observe the groupsync-10 test always passes
- Modify the group creation to add fewer members than i
- Observe the test still passes (because members.length === members.length is always true)
- Check the timing results — sync duration will be minimal since creator already has all data locally
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working