@webex/plugin-meetings 3.8.1-web-workers-keepalive.1 → 3.9.0-multipleLLM.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/constants.js +26 -2
- package/dist/constants.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/index.js +77 -95
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/parser.js +4 -1
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/media/properties.js +53 -5
- package/dist/media/properties.js.map +1 -1
- package/dist/meeting/brbState.js +14 -12
- package/dist/meeting/brbState.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +8 -0
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +443 -225
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/muteState.js +2 -5
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +44 -0
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/request.type.js.map +1 -1
- package/dist/meeting/type.js +7 -0
- package/dist/meeting/type.js.map +1 -0
- package/dist/meeting/util.js +98 -13
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +29 -21
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meetings/index.js +18 -10
- package/dist/meetings/index.js.map +1 -1
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js.map +1 -1
- package/dist/members/collection.js +13 -0
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +53 -29
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +3 -3
- package/dist/members/request.js.map +1 -1
- package/dist/members/util.js +25 -8
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.js +2 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +1 -1
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/remoteMedia.js +34 -5
- package/dist/multistream/remoteMedia.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.js +42 -2
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/multistream/sendSlotManager.js +32 -2
- package/dist/multistream/sendSlotManager.js.map +1 -1
- package/dist/reachability/index.js +3 -3
- package/dist/reachability/index.js.map +1 -1
- package/dist/types/constants.d.ts +24 -0
- package/dist/types/locus-info/index.d.ts +54 -10
- package/dist/types/media/properties.d.ts +21 -0
- package/dist/types/meeting/brbState.d.ts +0 -1
- package/dist/types/meeting/in-meeting-actions.d.ts +8 -0
- package/dist/types/meeting/index.d.ts +51 -20
- package/dist/types/meeting/request.d.ts +18 -1
- package/dist/types/meeting/request.type.d.ts +74 -0
- package/dist/types/meeting/type.d.ts +9 -0
- package/dist/types/meeting/util.d.ts +13 -3
- package/dist/types/meeting-info/meeting-info-v2.d.ts +6 -3
- package/dist/types/meetings/index.d.ts +3 -1
- package/dist/types/member/types.d.ts +1 -0
- package/dist/types/members/collection.d.ts +6 -0
- package/dist/types/members/index.d.ts +22 -9
- package/dist/types/members/request.d.ts +1 -1
- package/dist/types/members/util.d.ts +13 -6
- package/dist/types/metrics/constants.d.ts +1 -0
- package/dist/types/multistream/remoteMedia.d.ts +20 -1
- package/dist/types/multistream/remoteMediaGroup.d.ts +11 -0
- package/dist/types/multistream/sendSlotManager.d.ts +16 -0
- package/dist/webinar/index.js +1 -1
- package/package.json +23 -24
- package/src/constants.ts +25 -2
- package/src/locus-info/index.ts +133 -96
- package/src/locus-info/parser.ts +5 -1
- package/src/media/properties.ts +43 -0
- package/src/meeting/brbState.ts +9 -7
- package/src/meeting/in-meeting-actions.ts +17 -0
- package/src/meeting/index.ts +273 -42
- package/src/meeting/muteState.ts +2 -6
- package/src/meeting/request.ts +39 -0
- package/src/meeting/request.type.ts +64 -0
- package/src/meeting/type.ts +9 -0
- package/src/meeting/util.ts +114 -22
- package/src/meeting-info/meeting-info-v2.ts +24 -5
- package/src/meetings/index.ts +12 -5
- package/src/member/index.ts +1 -0
- package/src/member/types.ts +1 -0
- package/src/members/collection.ts +11 -0
- package/src/members/index.ts +51 -15
- package/src/members/request.ts +2 -2
- package/src/members/util.ts +34 -6
- package/src/metrics/constants.ts +1 -0
- package/src/multistream/mediaRequestManager.ts +7 -7
- package/src/multistream/remoteMedia.ts +34 -4
- package/src/multistream/remoteMediaGroup.ts +37 -2
- package/src/multistream/sendSlotManager.ts +34 -2
- package/src/reachability/index.ts +3 -3
- package/test/unit/spec/locus-info/index.js +229 -98
- package/test/unit/spec/locus-info/parser.js +3 -2
- package/test/unit/spec/media/properties.ts +137 -0
- package/test/unit/spec/meeting/brbState.ts +9 -9
- package/test/unit/spec/meeting/in-meeting-actions.ts +8 -0
- package/test/unit/spec/meeting/index.js +1022 -93
- package/test/unit/spec/meeting/muteState.js +32 -6
- package/test/unit/spec/meeting/request.js +92 -0
- package/test/unit/spec/meeting/utils.js +167 -17
- package/test/unit/spec/meeting-info/meetinginfov2.js +8 -3
- package/test/unit/spec/meetings/index.js +12 -1
- package/test/unit/spec/members/collection.js +120 -0
- package/test/unit/spec/members/index.js +140 -12
- package/test/unit/spec/members/request.js +57 -2
- package/test/unit/spec/members/utils.js +139 -17
- package/test/unit/spec/multistream/mediaRequestManager.ts +19 -6
- package/test/unit/spec/multistream/remoteMedia.ts +66 -2
- package/test/unit/spec/multistream/sendSlotManager.ts +59 -0
- package/test/unit/spec/reachability/index.ts +158 -1
@@ -3,7 +3,7 @@ import {MediaRequestManager} from '@webex/plugin-meetings/src/multistream/mediaR
|
|
3
3
|
import {ReceiveSlot} from '@webex/plugin-meetings/src/multistream/receiveSlot';
|
4
4
|
import sinon from 'sinon';
|
5
5
|
import {assert} from '@webex/test-helper-chai';
|
6
|
-
import {getMaxFs} from '@webex/plugin-meetings/src/multistream/remoteMedia';
|
6
|
+
import {getMaxFs, MAX_FS_VALUES} from '@webex/plugin-meetings/src/multistream/remoteMedia';
|
7
7
|
import FakeTimers from '@sinonjs/fake-timers';
|
8
8
|
import * as InternalMediaCoreModule from '@webex/internal-media-core';
|
9
9
|
import { expect } from 'chai';
|
@@ -36,12 +36,15 @@ describe('MediaRequestManager', () => {
|
|
36
36
|
const CROSS_POLICY_DUPLICATION = true;
|
37
37
|
const MAX_FPS = 3000;
|
38
38
|
const MAX_FS_360p = 920;
|
39
|
+
const MAX_FS_540p = 2040;
|
39
40
|
const MAX_FS_720p = 3600;
|
40
41
|
const MAX_FS_1080p = 8192;
|
41
42
|
const MAX_MBPS_360p = 27600;
|
43
|
+
const MAX_MBPS_540p = 61200;
|
42
44
|
const MAX_MBPS_720p = 108000;
|
43
45
|
const MAX_MBPS_1080p = 245760;
|
44
46
|
const MAX_PAYLOADBITSPS_360p = 640000;
|
47
|
+
const MAX_PAYLOADBITSPS_540p = 880000;
|
45
48
|
const MAX_PAYLOADBITSPS_720p = 2500000;
|
46
49
|
const MAX_PAYLOADBITSPS_1080p = 4000000;
|
47
50
|
|
@@ -82,7 +85,14 @@ describe('MediaRequestManager', () => {
|
|
82
85
|
});
|
83
86
|
|
84
87
|
// helper function for adding an active speaker request
|
85
|
-
const addActiveSpeakerRequest = (
|
88
|
+
const addActiveSpeakerRequest = (
|
89
|
+
priority,
|
90
|
+
receiveSlots,
|
91
|
+
maxFs,
|
92
|
+
commit = false,
|
93
|
+
preferLiveVideo = true,
|
94
|
+
namedMediaGroups = undefined
|
95
|
+
) =>
|
86
96
|
mediaRequestManager.addRequest(
|
87
97
|
{
|
88
98
|
policyInfo: {
|
@@ -216,6 +226,9 @@ describe('MediaRequestManager', () => {
|
|
216
226
|
},
|
217
227
|
false
|
218
228
|
);
|
229
|
+
|
230
|
+
|
231
|
+
|
219
232
|
mediaRequestManager.addRequest(
|
220
233
|
{
|
221
234
|
policyInfo: {
|
@@ -892,15 +905,15 @@ describe('MediaRequestManager', () => {
|
|
892
905
|
// request 10 "large" 1080p streams
|
893
906
|
addActiveSpeakerRequest(255, fakeReceiveSlots.slice(0, 10), getMaxFs('large'), true);
|
894
907
|
|
895
|
-
// check that resulting requests are 10
|
908
|
+
// check that resulting requests are 10 540p streams
|
896
909
|
checkMediaRequestsSent([
|
897
910
|
{
|
898
911
|
policy: 'active-speaker',
|
899
912
|
priority: 255,
|
900
913
|
receiveSlots: fakeWcmeSlots.slice(0, 10),
|
901
|
-
maxPayloadBitsPerSecond:
|
902
|
-
maxFs:
|
903
|
-
maxMbps:
|
914
|
+
maxPayloadBitsPerSecond: MAX_PAYLOADBITSPS_540p,
|
915
|
+
maxFs: MAX_FS_VALUES['540p'],
|
916
|
+
maxMbps: MAX_MBPS_540p,
|
904
917
|
},
|
905
918
|
]);
|
906
919
|
});
|
@@ -3,7 +3,7 @@ import 'jsdom-global/register';
|
|
3
3
|
import EventEmitter from 'events';
|
4
4
|
|
5
5
|
import {MediaType} from '@webex/internal-media-core';
|
6
|
-
import {RemoteMedia, RemoteMediaEvents} from '@webex/plugin-meetings/src/multistream/remoteMedia';
|
6
|
+
import {RemoteMedia, RemoteMediaEvents, RemoteVideoResolution} from '@webex/plugin-meetings/src/multistream/remoteMedia';
|
7
7
|
import {ReceiveSlotEvents} from '@webex/plugin-meetings/src/multistream/receiveSlot';
|
8
8
|
import sinon from 'sinon';
|
9
9
|
import {assert} from '@webex/test-helper-chai';
|
@@ -257,7 +257,9 @@ describe('RemoteMedia', () => {
|
|
257
257
|
{height: 198, fs: 920}, // 360p
|
258
258
|
{height: 360, fs: 920},
|
259
259
|
{height: 395, fs: 920},
|
260
|
-
{height: 396, fs:
|
260
|
+
{height: 396, fs: 2040}, // 540p
|
261
|
+
{height: 540, fs: 2040},
|
262
|
+
{height: 610, fs: 3600}, // 720p
|
261
263
|
{height: 720, fs: 3600},
|
262
264
|
{height: 721, fs: 8192}, // 1080p
|
263
265
|
{height: 1080, fs: 8192},
|
@@ -271,4 +273,66 @@ describe('RemoteMedia', () => {
|
|
271
273
|
}
|
272
274
|
);
|
273
275
|
});
|
276
|
+
|
277
|
+
describe('getEffectiveMaxFs()', () => {
|
278
|
+
it('returns maxFrameSize when it is greater than 0', () => {
|
279
|
+
remoteMedia.setSizeHint(960, 540);
|
280
|
+
|
281
|
+
const result = remoteMedia.getEffectiveMaxFs();
|
282
|
+
|
283
|
+
assert.strictEqual(result, 2040);
|
284
|
+
});
|
285
|
+
|
286
|
+
it('returns getMaxFs result when maxFrameSize is 0 and resolution is provided', () => {
|
287
|
+
remoteMedia.setSizeHint(0, 0);
|
288
|
+
|
289
|
+
// remoteMedia was created with {resolution: 'medium'} in beforeEach
|
290
|
+
|
291
|
+
const result = remoteMedia.getEffectiveMaxFs();
|
292
|
+
|
293
|
+
// 'medium' resolution should map to 720p which is 3600
|
294
|
+
assert.strictEqual(result, 3600);
|
295
|
+
});
|
296
|
+
|
297
|
+
it('returns undefined when maxFrameSize is 0 and no resolution is provided', () => {
|
298
|
+
remoteMedia.setSizeHint(0, 0);
|
299
|
+
|
300
|
+
// Create a new RemoteMedia without resolution option
|
301
|
+
const remoteMediaWithoutResolution = new RemoteMedia(fakeReceiveSlot, fakeMediaRequestManager);
|
302
|
+
|
303
|
+
const result = remoteMediaWithoutResolution.getEffectiveMaxFs();
|
304
|
+
|
305
|
+
assert.strictEqual(result, undefined);
|
306
|
+
});
|
307
|
+
|
308
|
+
it('prioritizes maxFrameSize over resolution option', () => {
|
309
|
+
remoteMedia.setSizeHint(640, 360);
|
310
|
+
// remoteMedia was created with {resolution: 'medium'} in beforeEach
|
311
|
+
|
312
|
+
const result = remoteMedia.getEffectiveMaxFs();
|
313
|
+
|
314
|
+
// Should return maxFrameSize (500) instead of resolution-based value (3600)
|
315
|
+
assert.strictEqual(result, 920);
|
316
|
+
});
|
317
|
+
|
318
|
+
it('works correctly with different resolution options', () => {
|
319
|
+
const testCases: Array<{ resolution: RemoteVideoResolution; expected: number }> = [
|
320
|
+
{ resolution: 'thumbnail', expected: 60 },
|
321
|
+
{ resolution: 'very small', expected: 240 },
|
322
|
+
{ resolution: 'small', expected: 920 },
|
323
|
+
{ resolution: 'medium', expected: 3600 },
|
324
|
+
{ resolution: 'large', expected: 8192 },
|
325
|
+
{ resolution: 'best', expected: 8192 },
|
326
|
+
];
|
327
|
+
|
328
|
+
testCases.forEach(({ resolution, expected }) => {
|
329
|
+
const testRemoteMedia = new RemoteMedia(fakeReceiveSlot, fakeMediaRequestManager, { resolution });
|
330
|
+
testRemoteMedia.setSizeHint(0, 0); // Ensure maxFrameSize doesn't interfere
|
331
|
+
|
332
|
+
const result = testRemoteMedia.getEffectiveMaxFs();
|
333
|
+
|
334
|
+
assert.strictEqual(result, expected, `Failed for resolution: ${resolution}`);
|
335
|
+
});
|
336
|
+
});
|
337
|
+
});
|
274
338
|
});
|
@@ -272,4 +272,63 @@ describe('SendSlotsManager', () => {
|
|
272
272
|
expect(() => sendSlotsManager.getSlot(MediaType.VideoSlides)).to.throw();
|
273
273
|
});
|
274
274
|
});
|
275
|
+
|
276
|
+
describe('sourceStateOverride', () => {
|
277
|
+
let mediaConnection: MultistreamRoapMediaConnection;
|
278
|
+
beforeEach(() => {
|
279
|
+
mediaConnection = {
|
280
|
+
createSendSlot: sinon.stub().returns({
|
281
|
+
setSourceStateOverride: sinon.stub().resolves(),
|
282
|
+
clearSourceStateOverride: sinon.stub().resolves(),
|
283
|
+
}),
|
284
|
+
} as MultistreamRoapMediaConnection;
|
285
|
+
});
|
286
|
+
|
287
|
+
it(`can set source state override for ${MediaType.VideoMain}`, () => {
|
288
|
+
const slot: any = sendSlotsManager.createSlot(mediaConnection, MediaType.VideoMain);
|
289
|
+
|
290
|
+
const set = () => sendSlotsManager.setSourceStateOverride(MediaType.VideoMain, 'away');
|
291
|
+
|
292
|
+
expect(set).not.to.throw();
|
293
|
+
expect(slot.setSourceStateOverride.calledWith('away')).to.be.true;
|
294
|
+
});
|
295
|
+
|
296
|
+
[MediaType.VideoSlides, MediaType.AudioMain, MediaType.AudioSlides].forEach((mediaType) => {
|
297
|
+
it(`can't set source state override for ${mediaType}`, () => {
|
298
|
+
const slot: any = sendSlotsManager.createSlot(mediaConnection, mediaType);
|
299
|
+
|
300
|
+
const set = () => sendSlotsManager.setSourceStateOverride(mediaType, 'away');
|
301
|
+
|
302
|
+
expect(set).to.throw();
|
303
|
+
expect(slot.setSourceStateOverride.called).to.be.false;
|
304
|
+
});
|
305
|
+
});
|
306
|
+
|
307
|
+
it("can't set source state override for non-existing slot", () => {
|
308
|
+
const set = () => sendSlotsManager.setSourceStateOverride(MediaType.VideoMain, 'away');
|
309
|
+
expect(set).to.throw(`Slot for ${MediaType.VideoMain} does not exist`);
|
310
|
+
});
|
311
|
+
|
312
|
+
it('can clear source state override', () => {
|
313
|
+
const slot: any = sendSlotsManager.createSlot(mediaConnection, MediaType.VideoMain);
|
314
|
+
sendSlotsManager.setSourceStateOverride(MediaType.VideoMain, 'away');
|
315
|
+
|
316
|
+
expect(slot.setSourceStateOverride.calledWith('away')).to.be.true;
|
317
|
+
expect(slot.clearSourceStateOverride.called).to.be.false;
|
318
|
+
|
319
|
+
sendSlotsManager.setSourceStateOverride(MediaType.VideoMain, null);
|
320
|
+
expect(slot.clearSourceStateOverride.called).to.be.true;
|
321
|
+
});
|
322
|
+
|
323
|
+
it("won't set source state override if it didn't change", () => {
|
324
|
+
const slot: any = sendSlotsManager.createSlot(mediaConnection, MediaType.VideoMain);
|
325
|
+
sendSlotsManager.setSourceStateOverride(MediaType.VideoMain, 'away');
|
326
|
+
|
327
|
+
expect(slot.setSourceStateOverride.calledWith('away')).to.be.true;
|
328
|
+
slot.setSourceStateOverride.resetHistory();
|
329
|
+
|
330
|
+
sendSlotsManager.setSourceStateOverride(MediaType.VideoMain, 'away');
|
331
|
+
expect(slot.setSourceStateOverride.called).to.be.false;
|
332
|
+
});
|
333
|
+
});
|
275
334
|
});
|
@@ -3,13 +3,14 @@ import MockWebex from '@webex/test-helper-mock-webex';
|
|
3
3
|
import sinon from 'sinon';
|
4
4
|
import EventEmitter from 'events';
|
5
5
|
import testUtils from '../../../utils/testUtils';
|
6
|
-
import Reachability
|
6
|
+
import Reachability from '@webex/plugin-meetings/src/reachability/';
|
7
7
|
import {ClusterNode} from '../../../../src/reachability/request';
|
8
8
|
import MeetingUtil from '@webex/plugin-meetings/src/meeting/util';
|
9
9
|
import * as ClusterReachabilityModule from '@webex/plugin-meetings/src/reachability/clusterReachability';
|
10
10
|
import Metrics from '@webex/plugin-meetings/src/metrics';
|
11
11
|
|
12
12
|
import {IP_VERSION} from '@webex/plugin-meetings/src/constants';
|
13
|
+
import { ReachabilityResultsForBackend } from '@webex/plugin-meetings/src/reachability/reachability.types';
|
13
14
|
|
14
15
|
describe('isAnyPublicClusterReachable', () => {
|
15
16
|
let webex;
|
@@ -834,6 +835,162 @@ describe('gatherReachability', () => {
|
|
834
835
|
},
|
835
836
|
},
|
836
837
|
// ========================================================================
|
838
|
+
{
|
839
|
+
title: '2 clusters: one with multiple urls, reachability should resolve after the first result for each protocol is ready',
|
840
|
+
waitShortTimeout: false,
|
841
|
+
waitLongTimeout: false,
|
842
|
+
mockClusters: {
|
843
|
+
cluster1: {
|
844
|
+
udp: ['udp-url1-1', 'udp-url1-2'],
|
845
|
+
tcp: ['tcp-url1-1', 'tcp-url1-2'],
|
846
|
+
xtls: ['xtls-url1-1', 'xtls-url1-2'],
|
847
|
+
isVideoMesh: false,
|
848
|
+
},
|
849
|
+
cluster2: {
|
850
|
+
udp: ['udp-url2'],
|
851
|
+
tcp: ['tcp-url2'],
|
852
|
+
xtls: ['xtls-url2'],
|
853
|
+
isVideoMesh: false,
|
854
|
+
},
|
855
|
+
},
|
856
|
+
mockResultReadyEvents: [
|
857
|
+
// results are only for the first url for each protocol not the 2nd one
|
858
|
+
{
|
859
|
+
clusterId: 'cluster1',
|
860
|
+
protocol: 'udp',
|
861
|
+
result: {
|
862
|
+
result: 'reachable',
|
863
|
+
clientMediaIPs: ['1.2.3.4'],
|
864
|
+
latencyInMilliseconds: 10,
|
865
|
+
},
|
866
|
+
},
|
867
|
+
{
|
868
|
+
clusterId: 'cluster1',
|
869
|
+
protocol: 'tcp',
|
870
|
+
result: {
|
871
|
+
result: 'reachable',
|
872
|
+
latencyInMilliseconds: 100,
|
873
|
+
},
|
874
|
+
},
|
875
|
+
{
|
876
|
+
clusterId: 'cluster1',
|
877
|
+
protocol: 'xtls',
|
878
|
+
result: {
|
879
|
+
result: 'reachable',
|
880
|
+
latencyInMilliseconds: 200,
|
881
|
+
},
|
882
|
+
},
|
883
|
+
{
|
884
|
+
clusterId: 'cluster2',
|
885
|
+
protocol: 'udp',
|
886
|
+
result: {
|
887
|
+
result: 'reachable',
|
888
|
+
clientMediaIPs: ['1.2.3.4'],
|
889
|
+
latencyInMilliseconds: 20,
|
890
|
+
},
|
891
|
+
},
|
892
|
+
{
|
893
|
+
clusterId: 'cluster2',
|
894
|
+
protocol: 'tcp',
|
895
|
+
result: {
|
896
|
+
result: 'reachable',
|
897
|
+
latencyInMilliseconds: 110,
|
898
|
+
},
|
899
|
+
},
|
900
|
+
{
|
901
|
+
clusterId: 'cluster2',
|
902
|
+
protocol: 'xtls',
|
903
|
+
result: {
|
904
|
+
result: 'reachable',
|
905
|
+
latencyInMilliseconds: 220,
|
906
|
+
},
|
907
|
+
},
|
908
|
+
],
|
909
|
+
expectedResults: {
|
910
|
+
cluster1: {
|
911
|
+
udp: {result: 'reachable', clientMediaIPs: ['1.2.3.4'], latencyInMilliseconds: 10},
|
912
|
+
tcp: {result: 'reachable', latencyInMilliseconds: 100},
|
913
|
+
xtls: {result: 'reachable', latencyInMilliseconds: 200},
|
914
|
+
isVideoMesh: false,
|
915
|
+
},
|
916
|
+
cluster2: {
|
917
|
+
udp: {result: 'reachable', clientMediaIPs: ['1.2.3.4'], latencyInMilliseconds: 20},
|
918
|
+
tcp: {result: 'reachable', latencyInMilliseconds: 110},
|
919
|
+
xtls: {result: 'reachable', latencyInMilliseconds: 220},
|
920
|
+
isVideoMesh: false,
|
921
|
+
},
|
922
|
+
},
|
923
|
+
expectedMetrics: {
|
924
|
+
vmn_udp_min: -1,
|
925
|
+
vmn_udp_max: -1,
|
926
|
+
vmn_udp_average: -1,
|
927
|
+
public_udp_min: 10,
|
928
|
+
public_udp_max: 20,
|
929
|
+
public_udp_average: 15,
|
930
|
+
public_tcp_min: 100,
|
931
|
+
public_tcp_max: 110,
|
932
|
+
public_tcp_average: 105,
|
933
|
+
public_xtls_min: 200,
|
934
|
+
public_xtls_max: 220,
|
935
|
+
public_xtls_average: 210,
|
936
|
+
},
|
937
|
+
},
|
938
|
+
// ========================================================================
|
939
|
+
{
|
940
|
+
title: '1 cluster with zero urls for TCP, reachability should resolve after the first result for each protocol is ready without waiting for TCP',
|
941
|
+
waitShortTimeout: false,
|
942
|
+
waitLongTimeout: false,
|
943
|
+
mockClusters: {
|
944
|
+
cluster1: {
|
945
|
+
udp: ['udp-url1'],
|
946
|
+
tcp: [],
|
947
|
+
xtls: ['xtls-url1'],
|
948
|
+
isVideoMesh: false,
|
949
|
+
},
|
950
|
+
},
|
951
|
+
mockResultReadyEvents: [
|
952
|
+
{
|
953
|
+
clusterId: 'cluster1',
|
954
|
+
protocol: 'udp',
|
955
|
+
result: {
|
956
|
+
result: 'reachable',
|
957
|
+
clientMediaIPs: ['1.2.3.4'],
|
958
|
+
latencyInMilliseconds: 10,
|
959
|
+
},
|
960
|
+
},
|
961
|
+
{
|
962
|
+
clusterId: 'cluster1',
|
963
|
+
protocol: 'xtls',
|
964
|
+
result: {
|
965
|
+
result: 'reachable',
|
966
|
+
latencyInMilliseconds: 200,
|
967
|
+
},
|
968
|
+
},
|
969
|
+
],
|
970
|
+
expectedResults: {
|
971
|
+
cluster1: {
|
972
|
+
udp: {result: 'reachable', clientMediaIPs: ['1.2.3.4'], latencyInMilliseconds: 10},
|
973
|
+
tcp: {result: 'untested'},
|
974
|
+
xtls: {result: 'reachable', latencyInMilliseconds: 200},
|
975
|
+
isVideoMesh: false,
|
976
|
+
},
|
977
|
+
},
|
978
|
+
expectedMetrics: {
|
979
|
+
vmn_udp_min: -1,
|
980
|
+
vmn_udp_max: -1,
|
981
|
+
vmn_udp_average: -1,
|
982
|
+
public_udp_min: 10,
|
983
|
+
public_udp_max: 10,
|
984
|
+
public_udp_average: 10,
|
985
|
+
public_tcp_min: -1,
|
986
|
+
public_tcp_max: -1,
|
987
|
+
public_tcp_average: -1,
|
988
|
+
public_xtls_min: 200,
|
989
|
+
public_xtls_max: 200,
|
990
|
+
public_xtls_average: 200,
|
991
|
+
},
|
992
|
+
},
|
993
|
+
// ========================================================================
|
837
994
|
{
|
838
995
|
title: '2 clusters: both with no results at all',
|
839
996
|
waitShortTimeout: 'public',
|