From 206a44d881fdbe2fbc0b6685d9a178c2a3a99964 Mon Sep 17 00:00:00 2001 From: cruizba Date: Thu, 2 Jun 2022 00:48:12 +0200 Subject: [PATCH] openvidu-test-e2e: Ignore videoDimensions event in filter event test. --- .../test/e2e/OpenViduTestAppE2eTest.java | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 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 f7844d98..d47b9d16 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 @@ -1009,14 +1009,18 @@ public class OpenViduTestAppE2eTest extends AbstractOpenViduTestappE2eTest { // Filter final CountDownLatch latch3 = new CountDownLatch(2); user.getEventManager().on("streamPropertyChanged", (event) -> { - threadAssertions.add("filter".equals(event.get("changedProperty").getAsString())); - threadAssertions.add("applyFilter".equals(event.get("reason").getAsString())); - threadAssertions.add(!event.has("oldValue")); - JsonObject newValue = event.get("newValue").getAsJsonObject(); - threadAssertions.add("GStreamerFilter".equals(newValue.get("type").getAsString())); - JsonObject options = newValue.get("options").getAsJsonObject(); - threadAssertions.add("videobalance saturation=0.0".equals(options.get("command").getAsString())); - latch3.countDown(); + // As chrome may change video dimensions, ignore video dimensions event + if (!"videoDimensions".equals(event.get("changedProperty").getAsString())) { + threadAssertions.add("filter".equals(event.get("changedProperty").getAsString())); + threadAssertions.add("applyFilter".equals(event.get("reason").getAsString())); + threadAssertions.add(!event.has("oldValue")); + JsonObject newValue = event.get("newValue").getAsJsonObject(); + threadAssertions.add("GStreamerFilter".equals(newValue.get("type").getAsString())); + JsonObject options = newValue.get("options").getAsJsonObject(); + threadAssertions.add("videobalance saturation=0.0".equals(options.get("command").getAsString())); + latch3.countDown(); + } + }); user.getDriver().findElement(By.cssSelector("#openvidu-instance-0 .filter-btn")).click(); Thread.sleep(1000);