Skip to content

Commit

Permalink
[Integration test] Update integration test server and add attendee pr…
Browse files Browse the repository at this point in the history
…esence timeout to audio, video test only (#1196)

* Fix integration server to handle query params while creating meeting

Currently, some canary runs are failing with the error:
Unable to create meeting, server error: Error: Request failed with status code 403

This is due to the incorrect handling of baseURL in the integration server.
This fix handles the query params if any and accordingly generates the create meeting URL.

This also changes wait time in the AppWaitTestStep to be 1000ms from 100ms.

* Add attendee presence timeout only for Audio and Video integration tests
  • Loading branch information
devalevenkatesh committed Apr 14, 2021
1 parent 6163ea1 commit c887dca
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 8 additions & 2 deletions integration/js/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,19 @@ createMeeting = async (baseUrl) => {
}
meetingCreationStatus = "creating";
meetingTitle = uuidv4();
const createMeetingUrl = `${baseUrl}join?title=${meetingTitle}&name=MeetingOwner&region=us-east-1`;
let url = `${baseUrl}`;
let index = url.indexOf('?');
if (index === -1) {
createMeetingUrl = `${url}join?title=${meetingTitle}&name=MeetingOwner&region=us-east-1`;
} else {
createMeetingUrl = `${url.substring(0, index)}join${url.substring(index)}&title=${meetingTitle}&name=MeetingOwner&region=us-east-1`;
}
let i = 0;
let retryAttempts = 3;
while (i < retryAttempts) {
i++;
try {
console.log(`Creating meeting with title: ${createMeetingUrl}`);
console.log(`Creating meeting with URL: ${createMeetingUrl}`);
createMeetingPromise = axios.post(createMeetingUrl);
const response = await createMeetingPromise;
const data = await response.data;
Expand Down
4 changes: 4 additions & 0 deletions integration/js/utils/SdkBaseTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ class SdkBaseTest extends KiteBaseTest {
this.userArn = this.payload.userArn;
}

if (['Video', 'Audio'].includes(testName)) {
this.url = this.getTransformedURL(this.url, 'attendee-presence-timeout-ms', 5000);
}

this.originalURL = this.url;
this.testReady = false;
this.testFinish = false;
Expand Down

0 comments on commit c887dca

Please sign in to comment.