From c0f0b0955f1aab084d9d958e1e7bcf53679c1d2c Mon Sep 17 00:00:00 2001 From: pabloFuente Date: Fri, 18 May 2018 17:58:15 +0200 Subject: [PATCH] openvidu-test-e2e recording path fix --- .../openvidu/test/e2e/OpenViduTestAppE2eTest.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/openvidu-test-e2e/src/test/java/io/openvidu/test/e2e/OpenViduTestAppE2eTest.java b/openvidu-test-e2e/src/test/java/io/openvidu/test/e2e/OpenViduTestAppE2eTest.java index 7f603d32..255d0c73 100644 --- a/openvidu-test-e2e/src/test/java/io/openvidu/test/e2e/OpenViduTestAppE2eTest.java +++ b/openvidu-test-e2e/src/test/java/io/openvidu/test/e2e/OpenViduTestAppE2eTest.java @@ -622,6 +622,9 @@ public class OpenViduTestAppE2eTest { threadAssertions.add(((String) event.get("eventContent")).contains("CAMERA")); }); user.getDriver().findElement(By.id("one2many-btn")).click(); + + Thread.sleep(2000); + user.getEventManager().waitUntilEventReaches("videoPlaying", 2); user.getEventManager().off("videoPlaying"); for (Iterator iter = threadAssertions.iterator(); iter.hasNext();) { @@ -631,6 +634,8 @@ public class OpenViduTestAppE2eTest { Assert.assertTrue(user.getEventManager().assertMediaTracks(user.getDriver().findElements(By.tagName("video")), true, true)); + + Thread.sleep(2000); // Second publication (only video (SCREEN)) user.getEventManager().on("videoPlaying", (event) -> { @@ -646,6 +651,8 @@ public class OpenViduTestAppE2eTest { Assert.assertTrue(user.getEventManager().assertMediaTracks(user.getDriver().findElements(By.tagName("video")), false, true)); + + Thread.sleep(2000); // Third publication (audio + video [CAMERA]) user.getEventManager().on("videoPlaying", (event) -> { @@ -761,9 +768,9 @@ public class OpenViduTestAppE2eTest { user.getEventManager().waitUntilEventReaches("recordingStopped", 1); - File file1 = new File("/opt/openvidu/recordings/" + sessionName + ".mp4"); - File file2 = new File("/opt/openvidu/recordings/.recording." + sessionName); - File file3 = new File("/opt/openvidu/recordings/" + sessionName + ".info"); + File file1 = new File(System.getProperty("user.dir") + "/recordings/" + sessionName + ".mp4"); + File file2 = new File(System.getProperty("user.dir") + "/recordings/.recording." + sessionName); + File file3 = new File(System.getProperty("user.dir") + "/recordings/" + sessionName + ".info"); Assert.assertFalse(!file1.exists() || file1.length() == 0); Assert.assertFalse(!file2.exists() || file2.length() == 0);