Skip to content

Commit

Permalink
e2e-tests: Fix composed quick start test
Browse files Browse the repository at this point in the history
  • Loading branch information
cruizba committed Dec 9, 2024
1 parent ef45123 commit c114907
Showing 1 changed file with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1533,11 +1533,19 @@ void composedQuickStartRecordTest() throws Exception {
event = CustomWebhook.waitForEvent("recordingStatusChanged", 5); // started
Assertions.assertEquals("started", event.get("status").getAsString(),
"Wrong status in recordingStatusChanged event");
event = CustomWebhook.waitForEvent("recordingStatusChanged", 10); // failed
Assertions.assertEquals("failed", event.get("status").getAsString(),
"Wrong status in recordingStatusChanged event");
Assertions.assertEquals(Recording.Status.failed, OV.getRecording(sessionName + "~2").getStatus(),
"Wrong recording status");
try {
// Wait first for a failed event
event = CustomWebhook.waitForEvent("recordingStatusChanged", 10); // failed
Assertions.assertEquals("failed", event.get("status").getAsString(),
"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 {
// Recording did have time to start. Should trigger started, stopped, ready
event = CustomWebhook.waitForEvent("recordingStatusChanged", 5); // started
Expand Down

0 comments on commit c114907

Please sign in to comment.