mirror of https://github.com/OpenVidu/openvidu.git
tests-e2e: Updated webhookTest
parent
04ef74df31
commit
9a85c506db
|
@ -3803,6 +3803,18 @@ public class OpenViduTestAppE2eTest extends AbstractOpenViduTestappE2eTest {
|
|||
@Test
|
||||
@DisplayName("Webhook test")
|
||||
void webhookTest() throws Exception {
|
||||
|
||||
// This test occasionally fails due to leftover events in the queue from previous tests.
|
||||
// To address this, we clean the queue before starting the test.
|
||||
// The beforeEach method does not handle queue cleanup because the v2 compatibility
|
||||
// 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);
|
||||
this.closeAllSessions(OV);
|
||||
this.deleteAllRecordings(OV);
|
||||
CustomWebhook.clean();
|
||||
|
||||
isRecordingTest = true;
|
||||
|
||||
CountDownLatch initLatch = new CountDownLatch(1);
|
||||
|
@ -3872,7 +3884,6 @@ public class OpenViduTestAppE2eTest extends AbstractOpenViduTestappE2eTest {
|
|||
user.getDriver().findElement(By.id("add-user-btn")).click();
|
||||
user.getDriver().findElement(By.cssSelector("#openvidu-instance-1 .join-btn")).click();
|
||||
|
||||
Thread.sleep(5000);
|
||||
event = CustomWebhook.waitForEvent("participantJoined", 2);
|
||||
CustomWebhook.waitForEvent("webrtcConnectionCreated", 12);
|
||||
// NO SUBSCRIBERS
|
||||
|
|
Loading…
Reference in New Issue