From c79cab528bfac6495206e50a8891d7e54e8436fd Mon Sep 17 00:00:00 2001 From: Diego Molina Date: Wed, 22 Feb 2023 23:49:32 +0100 Subject: [PATCH] [grid] Switching Selenium Manager flag to false by default Related to #11697 --- .../org/openqa/selenium/grid/node/config/NodeOptions.java | 2 +- .../org/openqa/selenium/grid/gridui/OverallGridTest.java | 4 +++- .../openqa/selenium/grid/router/DistributedCdpTest.java | 7 ++++--- .../selenium/grid/router/RemoteWebDriverBiDiTest.java | 7 +++++-- java/test/org/openqa/selenium/grid/router/StressTest.java | 1 + .../openqa/selenium/testing/drivers/RemoteSupplier.java | 2 +- 6 files changed, 15 insertions(+), 8 deletions(-) diff --git a/java/src/org/openqa/selenium/grid/node/config/NodeOptions.java b/java/src/org/openqa/selenium/grid/node/config/NodeOptions.java index db18560f0e90b..ef8647a28afb1 100644 --- a/java/src/org/openqa/selenium/grid/node/config/NodeOptions.java +++ b/java/src/org/openqa/selenium/grid/node/config/NodeOptions.java @@ -74,7 +74,7 @@ public class NodeOptions { public static final boolean DEFAULT_ENABLE_BIDI = true; static final String NODE_SECTION = "node"; static final boolean DEFAULT_DETECT_DRIVERS = true; - static final boolean DEFAULT_USE_SELENIUM_MANAGER = true; + static final boolean DEFAULT_USE_SELENIUM_MANAGER = false; static final boolean OVERRIDE_MAX_SESSIONS = false; static final String DEFAULT_VNC_ENV_VAR = "SE_START_XVFB"; static final int DEFAULT_NO_VNC_PORT = 7900; diff --git a/java/test/org/openqa/selenium/grid/gridui/OverallGridTest.java b/java/test/org/openqa/selenium/grid/gridui/OverallGridTest.java index e5e27cd712f31..a0926ac89dc29 100644 --- a/java/test/org/openqa/selenium/grid/gridui/OverallGridTest.java +++ b/java/test/org/openqa/selenium/grid/gridui/OverallGridTest.java @@ -18,6 +18,7 @@ package org.openqa.selenium.grid.gridui; import com.google.common.collect.ImmutableMap; + import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -112,7 +113,8 @@ private Server createStandalone() { Config config = new MemoizedConfig( new MapConfig(ImmutableMap.of( "server", Collections.singletonMap("port", port), - "node", Collections.singletonMap("detect-drivers", true)))); + "node", ImmutableMap.of("detect-drivers", true, "selenium-manager", true) + ))); Server server = new Standalone().asServer(config).start(); diff --git a/java/test/org/openqa/selenium/grid/router/DistributedCdpTest.java b/java/test/org/openqa/selenium/grid/router/DistributedCdpTest.java index 1282286cd01dc..c485375907a98 100644 --- a/java/test/org/openqa/selenium/grid/router/DistributedCdpTest.java +++ b/java/test/org/openqa/selenium/grid/router/DistributedCdpTest.java @@ -17,9 +17,6 @@ package org.openqa.selenium.grid.router; -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assumptions.assumeThat; - import com.google.common.collect.ImmutableMap; import org.junit.jupiter.api.BeforeAll; @@ -49,6 +46,9 @@ import java.util.Map; import java.util.Objects; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assumptions.assumeThat; + class DistributedCdpTest { @BeforeAll @@ -66,6 +66,7 @@ void ensureBasicFunctionality() { browser.getCapabilities(), new TomlConfig(new StringReader( "[node]\n" + + "selenium-manager = true\n" + "driver-implementation = " + browser.displayName()))); Server server = new NettyServer( diff --git a/java/test/org/openqa/selenium/grid/router/RemoteWebDriverBiDiTest.java b/java/test/org/openqa/selenium/grid/router/RemoteWebDriverBiDiTest.java index 05ad81143a2e8..00601dffd3890 100644 --- a/java/test/org/openqa/selenium/grid/router/RemoteWebDriverBiDiTest.java +++ b/java/test/org/openqa/selenium/grid/router/RemoteWebDriverBiDiTest.java @@ -17,8 +17,6 @@ package org.openqa.selenium.grid.router; -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; - import org.junit.jupiter.api.Test; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; @@ -48,6 +46,8 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; +import static org.assertj.core.api.AssertionsForClassTypes.assertThat; + class RemoteWebDriverBiDiTest { @Test @@ -58,6 +58,7 @@ void ensureBiDiSessionCreation() { browser.getCapabilities(), new TomlConfig(new StringReader( "[node]\n" + + "selenium-manager = true\n" + "driver-implementation = " + browser.displayName()))); FirefoxOptions options = new FirefoxOptions(); @@ -83,6 +84,7 @@ void canListenToLogs() throws ExecutionException, InterruptedException, TimeoutE browser.getCapabilities(), new TomlConfig(new StringReader( "[node]\n" + + "selenium-manager = true\n" + "driver-implementation = " + browser.displayName()))); FirefoxOptions options = new FirefoxOptions(); @@ -123,6 +125,7 @@ void canNavigateToUrl() throws ExecutionException, InterruptedException, Timeout browser.getCapabilities(), new TomlConfig(new StringReader( "[node]\n" + + "selenium-manager = true\n" + "driver-implementation = " + browser.displayName()))); FirefoxOptions options = new FirefoxOptions(); diff --git a/java/test/org/openqa/selenium/grid/router/StressTest.java b/java/test/org/openqa/selenium/grid/router/StressTest.java index add640ecb15ba..947523d3678c8 100644 --- a/java/test/org/openqa/selenium/grid/router/StressTest.java +++ b/java/test/org/openqa/selenium/grid/router/StressTest.java @@ -66,6 +66,7 @@ public void setupServers() { browser.getCapabilities(), new TomlConfig(new StringReader( "[node]\n" + + "selenium-manager = true\n" + "driver-implementation = " + browser.displayName()))); tearDowns.add(deployment); diff --git a/java/test/org/openqa/selenium/testing/drivers/RemoteSupplier.java b/java/test/org/openqa/selenium/testing/drivers/RemoteSupplier.java index b65895c96456d..114d89eb211dd 100644 --- a/java/test/org/openqa/selenium/testing/drivers/RemoteSupplier.java +++ b/java/test/org/openqa/selenium/testing/drivers/RemoteSupplier.java @@ -67,7 +67,7 @@ private synchronized void startServer() { if (started) { return; } - server.start("standalone"); + server.start("standalone", "--selenium-manager", "true"); started = true; } }