Skip to content

Commit

Permalink
feat(meetings): timeout for cluster discovery request (#4004)
Browse files Browse the repository at this point in the history
  • Loading branch information
Coread authored Nov 25, 2024
1 parent 30d29dd commit 7e0ed3c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
1 change: 1 addition & 0 deletions packages/@webex/plugin-meetings/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,6 @@ export default {
// This only applies to non-multistream meetings
iceCandidatesGatheringTimeout: undefined,
backendIpv6NativeSupport: false,
reachabilityGetClusterTimeout: 5000,
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class ReachabilityRequest {
JCSupport: 1,
ipver: ipVersion,
},
timeout: this.webex.config.meetings.reachabilityGetClusterTimeout,
}),
'internal.get.cluster.time'
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,23 @@ describe('plugin-meetings/reachability', () => {
}
}));

webex.config.meetings.reachabilityGetClusterTimeout = 3000;

const res = await reachabilityRequest.getClusters(IP_VERSION.only_ipv4);
const requestParams = webex.request.getCall(0).args[0];

assert.equal(requestParams.method, 'GET');
assert.equal(requestParams.resource, `clusters`);
assert.equal(requestParams.api, 'calliopeDiscovery');
assert.equal(requestParams.shouldRefreshAccessToken, false);

assert.deepEqual(requestParams.qs, {
JCSupport: 1,
ipver: 4,
assert.deepEqual(requestParams, {
method: 'GET',
resource: `clusters`,
api: 'calliopeDiscovery',
shouldRefreshAccessToken: false,
qs: {
JCSupport: 1,
ipver: 4,
},
timeout: 3000,
});

assert.deepEqual(res.clusters.clusterId, {udp: "testUDP", isVideoMesh: true})
assert.deepEqual(res.joinCookie, {anycastEntryPoint: "aws-eu-west-1"})
assert.calledOnceWithExactly(webex.internal.newMetrics.callDiagnosticLatencies.measureLatency, sinon.match.func, 'internal.get.cluster.time');
Expand Down

0 comments on commit 7e0ed3c

Please sign in to comment.