-
Notifications
You must be signed in to change notification settings - Fork 549
feat(client-presence): Create Acknowledgment message interface and ackRequested
flow
#24470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 14 commits
649f757
f3d92c5
36e46f6
f679bc9
a5bcfa7
ad1793f
35757eb
e6c52b1
433df8b
bd69e1d
d50f7d3
b524bd8
3f55646
a820892
cb28f2a
acc759a
3815ef3
c7b1ed2
bb62127
354fc29
b88ed5d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
WillieHabi marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
|
||
import { strict as assert } from "node:assert"; | ||
|
||
import type { ILayerCompatDetails } from "@fluid-internal/client-utils"; | ||
import type { ITelemetryBaseLogger } from "@fluidframework/core-interfaces"; | ||
import type { IClient, ISequencedClient } from "@fluidframework/driver-definitions"; | ||
import { MockAudience, MockQuorumClients } from "@fluidframework/test-runtime-utils/internal"; | ||
|
@@ -78,6 +79,7 @@ export class MockEphemeralRuntime implements IEphemeralRuntime { | |
connected: [], | ||
disconnected: [], | ||
}; | ||
private readonly supportedFeatures = new Set(["submit_signals_v2"]); | ||
private isSupportedEvent(event: string): event is keyof typeof this.listeners { | ||
return event in this.listeners; | ||
} | ||
|
@@ -136,6 +138,14 @@ export class MockEphemeralRuntime implements IEphemeralRuntime { | |
); | ||
} | ||
|
||
public setTargetSignalSupport(supported: boolean): void { | ||
if (supported) { | ||
this.supportedFeatures.add("submit_signals_v2"); | ||
} else { | ||
this.supportedFeatures.delete("submit_signals_v2"); | ||
} | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For future use? I don't see reference to this.? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I assumed in the future we'd want something like this to test behavior of both flows (broadcast join vs targeted join behavior). |
||
|
||
public removeMember(clientId: ClientConnectionId): void { | ||
const client = this.audience.getMember(clientId); | ||
assert(client !== undefined, `Attempting to remove unknown connection: ${clientId}`); | ||
|
@@ -187,5 +197,13 @@ export class MockEphemeralRuntime implements IEphemeralRuntime { | |
assert.deepStrictEqual(args, expected, "Unexpected signal"); | ||
}; | ||
|
||
public get ILayerCompatDetails(): ILayerCompatDetails { | ||
return { | ||
supportedFeatures: this.supportedFeatures, | ||
generation: 1, | ||
pkgVersion: "2.33.0", | ||
WillieHabi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}; | ||
} | ||
|
||
// #endregion | ||
} |
Uh oh!
There was an error while loading. Please reload this page.