mirror of https://github.com/OpenVidu/openvidu.git
tests-e2e: Fixed tests
parent
e00a5ae3ca
commit
14682345ed
|
@ -314,7 +314,7 @@ public class OpenViduProTestAppE2eTest extends AbstractOpenViduTestappE2eTest {
|
|||
CustomWebhook.waitForEvent("participantLeft", 2).get("reason").getAsString());
|
||||
for (int i = 0; i < 2; i++) {
|
||||
Assertions.assertEquals("recordingStoppedByServer", // reason is always "recordingStoppedByServer" in v2Compatibility
|
||||
CustomWebhook.waitForEvent("recordingStatusChanged", 2).get("reason").getAsString());
|
||||
CustomWebhook.waitForEvent("recordingStatusChanged", 60).get("reason").getAsString());
|
||||
}
|
||||
// broadcastStopped does not exist in the official OpenVidu docs and v2Compatibility does not trigger it
|
||||
// Assertions.assertEquals("lastParticipantLeft",
|
||||
|
@ -342,6 +342,7 @@ public class OpenViduProTestAppE2eTest extends AbstractOpenViduTestappE2eTest {
|
|||
.filter(con -> con.getAsJsonObject().get("role").getAsString().equals("PUBLISHER")).findFirst()
|
||||
.get().getAsJsonObject().get("publishers").getAsJsonArray().get(0).getAsJsonObject()
|
||||
.get("streamId").getAsString();
|
||||
|
||||
restClient.rest(HttpMethod.DELETE, "/openvidu/api/sessions/TestSession/stream/" + streamId,
|
||||
HttpURLConnection.HTTP_NO_CONTENT);
|
||||
// webrtcConnectionDestroyed event is only triggered when participant left in v2Compatibility
|
||||
|
@ -380,7 +381,7 @@ public class OpenViduProTestAppE2eTest extends AbstractOpenViduTestappE2eTest {
|
|||
// webrtcConnectionDestroyed event is only triggered when participant left in v2Compatibility
|
||||
// for (int i = 0; i < 3; i++) {
|
||||
Assertions.assertEquals("unpublish", // reason is always "unpublish" in v2Compatibility
|
||||
CustomWebhook.waitForEvent("webrtcConnectionDestroyed", 2).get("reason").getAsString());
|
||||
CustomWebhook.waitForEvent("webrtcConnectionDestroyed", 60).get("reason").getAsString());
|
||||
// }
|
||||
Assertions.assertEquals("disconnect", // reason is always "disconnect" in v2Compatibility
|
||||
CustomWebhook.waitForEvent("participantLeft", 2).get("reason").getAsString());
|
||||
|
@ -3385,7 +3386,8 @@ public class OpenViduProTestAppE2eTest extends AbstractOpenViduTestappE2eTest {
|
|||
File screenshot = new File(broadcastRecordingPath + "/tmp/rtmp-screenshot.jpg");
|
||||
if (screenshot.exists() && screenshot.isFile() && screenshot.length() > 0 && screenshot.canRead()) {
|
||||
// The check logic is not working properly
|
||||
// Assertions.assertTrue(this.recordingUtils.thumbnailIsFine(screenshot, colorCheckFunction),
|
||||
// Assertions.assertTrue(this.recordingUtils.thumbnailIsFine(screenshot,
|
||||
// colorCheckFunction),
|
||||
// "RTMP screenshot " + screenshot.getAbsolutePath() + " is not fine");
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -1718,6 +1718,8 @@ public class OpenViduTestAppE2eTest extends AbstractOpenViduTestappE2eTest {
|
|||
@Test
|
||||
@DisplayName("Record cross-browser audio-only and video-only")
|
||||
void audioOnlyVideoOnlyRecordTest() throws Exception {
|
||||
|
||||
Thread.sleep(4000);
|
||||
isRecordingTest = true;
|
||||
|
||||
OpenViduTestappUser user = setupBrowserAndConnectToOpenViduTestapp("chromeAlternateScreenShare");
|
||||
|
@ -1909,7 +1911,9 @@ public class OpenViduTestAppE2eTest extends AbstractOpenViduTestappE2eTest {
|
|||
// Check audio-only INDIVIDUAL recording
|
||||
recPath = recordingsPath + SESSION_NAME + "~2/";
|
||||
recording = new OpenVidu(OPENVIDU_URL, OPENVIDU_SECRET).getRecording(SESSION_NAME + "~2");
|
||||
this.recordingUtils.checkIndividualRecording(recPath, recording, 2, "opus",null, true);
|
||||
// As the recording is audio only and there is only one participant publishing its audio
|
||||
// The zip file only has 1 file (audio file)
|
||||
this.recordingUtils.checkIndividualRecording(recPath, recording, 1, "opus",null, true);
|
||||
|
||||
user.getDriver().findElement(By.id("close-dialog-btn")).click();
|
||||
Thread.sleep(500);
|
||||
|
@ -3822,7 +3826,7 @@ public class OpenViduTestAppE2eTest extends AbstractOpenViduTestappE2eTest {
|
|||
// server requires additional time after stopping a recording before it can be deleted,
|
||||
// causing the beforeEach logic to be bypassed.
|
||||
// To ensure stability, we add a delay and perform manual cleanup:
|
||||
Thread.sleep(2000);
|
||||
Thread.sleep(5000);
|
||||
this.closeAllSessions(OV);
|
||||
this.deleteAllRecordings(OV);
|
||||
CustomWebhook.clean();
|
||||
|
@ -3962,7 +3966,7 @@ public class OpenViduTestAppE2eTest extends AbstractOpenViduTestappE2eTest {
|
|||
// CustomWebhook.waitForEvent("webrtcConnectionDestroyed", 2);
|
||||
CustomWebhook.waitForEvent("participantLeft", 2);
|
||||
CustomWebhook.waitForEvent("participantLeft", 2);
|
||||
event = CustomWebhook.waitForEvent("recordingStatusChanged", 2);
|
||||
event = CustomWebhook.waitForEvent("recordingStatusChanged", 60);
|
||||
|
||||
OV.fetch();
|
||||
List<Recording> recs = OV.listRecordings();
|
||||
|
|
Loading…
Reference in New Issue