Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
fix: Check for ICE connected as part of ensureXParticipants. (#15664)
bgrozev6b1f7138c6b0
diff --git a/tests/helpers/Participant.ts b/tests/helpers/Participant.tsindex 012223b5ca..0d04a24475 100644--- a/tests/helpers/Participant.ts+++ b/tests/helpers/Participant.ts@@ -221,17 +221,16 @@ export class Participant {await this.waitToJoinMUC();}- await this.postLoadProcess(options.skipInMeetingChecks);+ await this.postLoadProcess();}/*** Loads stuff after the page loads.*- * @param {boolean} skipInMeetingChecks - Whether to skip in meeting checks.* @returns {Promise<void>}* @private*/- private async postLoadProcess(skipInMeetingChecks = false): Promise<void> {+ private async postLoadProcess(): Promise<void> {const driver = this.driver;const parallel = [];@@ -261,15 +260,6 @@ export class Participant {}}, this._name, driver.sessionId, LOG_PREFIX));- if (skipInMeetingChecks) {- await Promise.allSettled(parallel);-- return;- }-- parallel.push(this.waitForIceConnected());- parallel.push(this.waitForSendReceiveData());-await Promise.all(parallel);}diff --git a/tests/helpers/participants.ts b/tests/helpers/participants.tsindex 519bff380a..073399d337 100644--- a/tests/helpers/participants.ts+++ b/tests/helpers/participants.ts@@ -45,11 +45,19 @@ export async function ensureThreeParticipants(ctx: IContext, options: IJoinOptio})]);- const { skipInMeetingChecks } = options;+ if (options.skipInMeetingChecks) {+ return Promise.resolve();+ }await Promise.all([- skipInMeetingChecks ? Promise.resolve() : ctx.p2.waitForRemoteStreams(2),- skipInMeetingChecks ? Promise.resolve() : ctx.p3.waitForRemoteStreams(2)+ ctx.p1.waitForIceConnected(),+ ctx.p2.waitForIceConnected(),+ ctx.p3.waitForIceConnected()+ ]);+ await Promise.all([+ ctx.p1.waitForSendReceiveData().then(() => ctx.p1.waitForRemoteStreams(1)),+ ctx.p2.waitForSendReceiveData().then(() => ctx.p2.waitForRemoteStreams(1)),+ ctx.p3.waitForSendReceiveData().then(() => ctx.p3.waitForRemoteStreams(1)),]);}@@ -128,12 +136,21 @@ export async function ensureFourParticipants(ctx: IContext, options: IJoinOption})]);- const { skipInMeetingChecks } = options;+ if (options.skipInMeetingChecks) {+ return Promise.resolve();+ }await Promise.all([- skipInMeetingChecks ? Promise.resolve() : ctx.p2.waitForRemoteStreams(3),- skipInMeetingChecks ? Promise.resolve() : ctx.p3.waitForRemoteStreams(3),- skipInMeetingChecks ? Promise.resolve() : ctx.p3.waitForRemoteStreams(3)+ ctx.p1.waitForIceConnected(),+ ctx.p2.waitForIceConnected(),+ ctx.p3.waitForIceConnected(),+ ctx.p4.waitForIceConnected()+ ]);+ await Promise.all([+ ctx.p1.waitForSendReceiveData().then(() => ctx.p1.waitForRemoteStreams(1)),+ ctx.p2.waitForSendReceiveData().then(() => ctx.p2.waitForRemoteStreams(1)),+ ctx.p3.waitForSendReceiveData().then(() => ctx.p3.waitForRemoteStreams(1)),+ ctx.p4.waitForSendReceiveData().then(() => ctx.p4.waitForRemoteStreams(1)),]);}@@ -158,8 +175,7 @@ async function joinTheModeratorAsP1(ctx: IContext, options?: IJoinOptions) {ctx.p1 = p;}, {displayName: p1DisplayName,- ...options,- skipInMeetingChecks: true+ ...options}, token);}@@ -172,8 +188,6 @@ async function joinTheModeratorAsP1(ctx: IContext, options?: IJoinOptions) {export async function ensureTwoParticipants(ctx: IContext, options: IJoinOptions = {}): Promise<void> {await joinTheModeratorAsP1(ctx, options);- const { skipInMeetingChecks } = options;-await _joinParticipant('participant2', ctx.p2, p => {ctx.p2 = p;}, {@@ -181,9 +195,17 @@ export async function ensureTwoParticipants(ctx: IContext, options: IJoinOptions...options});+ if (options.skipInMeetingChecks) {+ return Promise.resolve();+ }++ await Promise.all([+ ctx.p1.waitForIceConnected(),+ ctx.p2.waitForIceConnected()+ ]);await Promise.all([- skipInMeetingChecks ? Promise.resolve() : ctx.p1.waitForRemoteStreams(1),- skipInMeetingChecks ? Promise.resolve() : ctx.p2.waitForRemoteStreams(1)+ ctx.p1.waitForSendReceiveData().then(() => ctx.p1.waitForRemoteStreams(1)),+ ctx.p2.waitForSendReceiveData().then(() => ctx.p2.waitForRemoteStreams(1))]);}