Skip to content

Commit

Permalink
Fix flaky test for attribution for r11s (microsoft#22313)
Browse files Browse the repository at this point in the history
## Description

[ADO Task
Link](https://dev.azure.com/fluidframework/internal/_workitems/edit/10969)

Fix flaky test for attribution for r11s. Move clientid check after
ensureSynchronized so that we can make sure we are connected.

Co-authored-by: Jatin Garg <[email protected]>
  • Loading branch information
jatgarg and Jatin Garg authored Aug 26, 2024
1 parent f5dd218 commit f5277b8
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,6 @@ describeCompat("Attributor for SharedCell", "NoCompat", (getTestObjectProvider,
const container2 = await provider.loadTestContainer(getTestConfig(true));
const sharedCell2 = await sharedCellFromContainer(container2);

assert(
container1.clientId !== undefined && container2.clientId !== undefined,
"Both containers should have client ids.",
);

const attributor1 = await getAttributorFromContainer(container1);
const attributor2 = await getAttributorFromContainer(container2);
sharedCell1.set(1);
Expand All @@ -151,6 +146,10 @@ describeCompat("Attributor for SharedCell", "NoCompat", (getTestObjectProvider,
sharedCell2.set(2);
await provider.ensureSynchronized();

assert(
container1.clientId !== undefined && container2.clientId !== undefined,
"Both containers should have client ids.",
);
assertAttributionMatches(sharedCell1, attributor1, {
user: container1.audience.getMember(container2.clientId)?.user,
});
Expand Down

0 comments on commit f5277b8

Please sign in to comment.