Test sync loop status and membership status in reconnection test as well

This commit is contained in:
Robin
2025-08-22 18:12:33 +02:00
parent db65a5308a
commit 7ba4df7781
2 changed files with 79 additions and 30 deletions

View File

@@ -360,15 +360,25 @@ export class MockRTCSession extends TypedEventEmitter<
return this;
}
public readonly membershipStatus = Status.Connected;
private _membershipStatus = Status.Connected;
public get membershipStatus(): Status {
return this._membershipStatus;
}
public set membershipStatus(value: Status) {
const prev = this._membershipStatus;
this._membershipStatus = value;
if (value !== prev)
this.emit(MembershipManagerEvent.StatusChanged, prev, value);
}
private _probablyLeft = false;
public get probablyLeft(): boolean {
return this._probablyLeft;
}
public set probablyLeft(value: boolean) {
const prev = this._probablyLeft;
this._probablyLeft = value;
this.emit(MembershipManagerEvent.ProbablyLeft, value);
if (value !== prev) this.emit(MembershipManagerEvent.ProbablyLeft, value);
}
}