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
feat(tests): Adds keep-alive to newly created sessions.
damencho7833e1337e35
diff --git a/tests/helpers/types.ts b/tests/helpers/types.tsindex 2193ca41fd..1491648045 100644--- a/tests/helpers/types.ts+++ b/tests/helpers/types.ts@@ -9,6 +9,7 @@ export type IContext = {iframeAPI: boolean;jwtKid: string;jwtPrivateKeyPath: string;+ keepAlive: Array<any>;p1: Participant;p2: Participant;p3: Participant;diff --git a/tests/wdio.conf.ts b/tests/wdio.conf.tsindex 15057bdc95..cd07867a29 100644--- a/tests/wdio.conf.ts+++ b/tests/wdio.conf.ts@@ -179,12 +179,24 @@ export const config: WebdriverIO.MultiremoteConfig = {console.log(`Running test: ${testName} via worker: ${cid}`);+ const globalAny: any = global;++ globalAny.ctx = {+ times: {}+ } as IContext;+ globalAny.ctx.keepAlive = [];+await Promise.all(multiremotebrowser.instances.map(async (instance: string) => {const bInstance = multiremotebrowser.getInstance(instance);// @ts-ignoreinitLogger(bInstance, `${instance}-${cid}-${testName}`, TEST_RESULTS_DIR);+ // setup keepalive+ globalAny.ctx.keepAlive.push(setInterval(async () => {+ await bInstance.execute(() => console.log('keep-alive'));+ }, 20_000));+if (bInstance.isFirefox) {return;}@@ -195,13 +207,7 @@ export const config: WebdriverIO.MultiremoteConfig = {bInstance.iframePageBase = `file://${path.dirname(rpath)}`;}));- const globalAny: any = global;- const roomName = `jitsimeettorture-${crypto.randomUUID()}`;-- globalAny.ctx = {- times: {}- } as IContext;- globalAny.ctx.roomName = roomName;+ globalAny.ctx.roomName = `jitsimeettorture-${crypto.randomUUID()}`;globalAny.ctx.jwtPrivateKeyPath = process.env.JWT_PRIVATE_KEY_PATH;globalAny.ctx.jwtKid = process.env.JWT_KID;},@@ -212,6 +218,8 @@ export const config: WebdriverIO.MultiremoteConfig = {if (ctx?.webhooksProxy) {ctx.webhooksProxy.disconnect();}++ ctx.keepAlive?.forEach(clearInterval);},beforeSession(c, capabilities, specs, cid) {