mirror of https://github.com/OpenVidu/openvidu.git
e2e-tests: Fix composed quick start test
parent
ef45123a74
commit
c1149079c8
|
@ -1533,11 +1533,19 @@ public class OpenViduTestAppE2eTest extends AbstractOpenViduTestappE2eTest {
|
||||||
event = CustomWebhook.waitForEvent("recordingStatusChanged", 5); // started
|
event = CustomWebhook.waitForEvent("recordingStatusChanged", 5); // started
|
||||||
Assertions.assertEquals("started", event.get("status").getAsString(),
|
Assertions.assertEquals("started", event.get("status").getAsString(),
|
||||||
"Wrong status in recordingStatusChanged event");
|
"Wrong status in recordingStatusChanged event");
|
||||||
event = CustomWebhook.waitForEvent("recordingStatusChanged", 10); // failed
|
try {
|
||||||
Assertions.assertEquals("failed", event.get("status").getAsString(),
|
// Wait first for a failed event
|
||||||
"Wrong status in recordingStatusChanged event");
|
event = CustomWebhook.waitForEvent("recordingStatusChanged", 10); // failed
|
||||||
Assertions.assertEquals(Recording.Status.failed, OV.getRecording(sessionName + "~2").getStatus(),
|
Assertions.assertEquals("failed", event.get("status").getAsString(),
|
||||||
"Wrong recording status");
|
"Wrong status in recordingStatusChanged event");
|
||||||
|
Assertions.assertEquals(Recording.Status.failed, OV.getRecording(sessionName + "~2").getStatus(),
|
||||||
|
"Wrong recording status");
|
||||||
|
} catch (Exception e) {
|
||||||
|
// If the failed event is not received, it's because the session has been destroyed
|
||||||
|
// before the recording started
|
||||||
|
// Check for sessionDestroyed event
|
||||||
|
event = CustomWebhook.waitForEvent("sessionDestroyed", 5);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// Recording did have time to start. Should trigger started, stopped, ready
|
// Recording did have time to start. Should trigger started, stopped, ready
|
||||||
event = CustomWebhook.waitForEvent("recordingStatusChanged", 5); // started
|
event = CustomWebhook.waitForEvent("recordingStatusChanged", 5); // started
|
||||||
|
|
Loading…
Reference in New Issue