Skip to content

test(client): split state tests from join/leave tests#25364

Merged
jason-ha merged 1 commit intomainfrom
presence/test/split-test-groups
Sep 2, 2025
Merged

test(client): split state tests from join/leave tests#25364
jason-ha merged 1 commit intomainfrom
presence/test/split-test-groups

Conversation

@jason-ha
Copy link
Contributor

@jason-ha jason-ha commented Sep 2, 2025

so client counts can be independently configured.

@github-actions github-actions bot added the base: main PRs targeted against main branch label Sep 2, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors presence tests by separating state synchronization tests from join/leave tests, allowing for independent configuration of client counts for different test scenarios.

  • Extracts state-related timeout constants from the join/leave test scope
  • Moves Latest and LatestMap state tests into separate test blocks with configurable client counts
  • Adds parameterized testing with different client counts (5 and 20) for state synchronization tests

@jason-ha jason-ha enabled auto-merge (squash) September 2, 2025 21:18
@jason-ha jason-ha merged commit b572777 into main Sep 2, 2025
33 checks passed
@jason-ha jason-ha deleted the presence/test/split-test-groups branch September 2, 2025 21:18
Comment on lines +234 to +249
for (const numClients of [5, 20]) {
assert(numClients > 1, "Must have at least two clients");
/**
* Timeout for child processes to connect to container ({@link ConnectedEvent})
*/
const childConnectTimeoutMs = 1000 * numClients * timeoutMultiplier;

let children: ChildProcess[];
let childErrorPromise: Promise<never>;
let containerCreatorAttendeeId: AttendeeId;
let attendeeIdPromises: Promise<AttendeeId>[];
let remoteClients: ChildProcess[];
const testValue = "testValue";
const workspaceId = "presenceTestWorkspace";

beforeEach(async () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oopsie. This causes two beforeEachs for each case. That isn't right...
cc: @WillieHabi

anthony-murphy-agent pushed a commit to anthony-murphy-agent/FluidFramework that referenced this pull request Jan 14, 2026
so client counts can be independently configured.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

base: main PRs targeted against main branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants