test(client): split state tests from join/leave tests#25364
Merged
Conversation
Contributor
There was a problem hiding this comment.
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
...ges/service-clients/end-to-end-tests/azure-client/src/test/multiprocess/presenceTest.spec.ts
Show resolved
Hide resolved
...ges/service-clients/end-to-end-tests/azure-client/src/test/multiprocess/presenceTest.spec.ts
Show resolved
Hide resolved
...ges/service-clients/end-to-end-tests/azure-client/src/test/multiprocess/presenceTest.spec.ts
Show resolved
Hide resolved
WillieHabi
approved these changes
Sep 2, 2025
jason-ha
commented
Oct 30, 2025
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 () => { |
Contributor
Author
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
so client counts can be independently configured.