From cf684e40bc9eb0c1915235a5794ca1b2f3c9b096 Mon Sep 17 00:00:00 2001 From: Diego Molina Date: Mon, 6 Sep 2021 16:33:58 +0200 Subject: [PATCH] [grid] Moving SessionQueue config to a single class --- .../openqa/selenium/grid/commands/Hub.java | 26 +++---- .../selenium/grid/commands/Standalone.java | 26 +++---- .../config/NewSessionQueueFlags.java | 20 +++++- .../config/NewSessionQueueOptions.java | 41 ++++++++++- .../config/SessionRequestFlags.java | 56 --------------- .../config/SessionRequestOptions.java | 70 ------------------- .../local/LocalNewSessionQueue.java | 15 ++-- .../openqa/selenium/grid/router/JmxTest.java | 30 ++++---- 8 files changed, 110 insertions(+), 174 deletions(-) delete mode 100644 java/src/org/openqa/selenium/grid/sessionqueue/config/SessionRequestFlags.java delete mode 100644 java/src/org/openqa/selenium/grid/sessionqueue/config/SessionRequestOptions.java diff --git a/java/src/org/openqa/selenium/grid/commands/Hub.java b/java/src/org/openqa/selenium/grid/commands/Hub.java index 9dd8db5760c19..6694461450659 100644 --- a/java/src/org/openqa/selenium/grid/commands/Hub.java +++ b/java/src/org/openqa/selenium/grid/commands/Hub.java @@ -17,6 +17,15 @@ package org.openqa.selenium.grid.commands; +import static java.net.HttpURLConnection.HTTP_INTERNAL_ERROR; +import static java.net.HttpURLConnection.HTTP_OK; +import static org.openqa.selenium.grid.config.StandardGridRoles.DISTRIBUTOR_ROLE; +import static org.openqa.selenium.grid.config.StandardGridRoles.EVENT_BUS_ROLE; +import static org.openqa.selenium.grid.config.StandardGridRoles.HTTPD_ROLE; +import static org.openqa.selenium.grid.config.StandardGridRoles.ROUTER_ROLE; +import static org.openqa.selenium.grid.config.StandardGridRoles.SESSION_QUEUE_ROLE; +import static org.openqa.selenium.remote.http.Route.combine; + import com.google.auto.service.AutoService; import com.google.common.collect.ImmutableSet; @@ -44,7 +53,7 @@ import org.openqa.selenium.grid.sessionmap.SessionMap; import org.openqa.selenium.grid.sessionmap.local.LocalSessionMap; import org.openqa.selenium.grid.sessionqueue.NewSessionQueue; -import org.openqa.selenium.grid.sessionqueue.config.SessionRequestOptions; +import org.openqa.selenium.grid.sessionqueue.config.NewSessionQueueOptions; import org.openqa.selenium.grid.sessionqueue.local.LocalNewSessionQueue; import org.openqa.selenium.grid.web.CombinedHandler; import org.openqa.selenium.grid.web.GridUiRoute; @@ -64,15 +73,6 @@ import java.util.Set; import java.util.logging.Logger; -import static java.net.HttpURLConnection.HTTP_INTERNAL_ERROR; -import static java.net.HttpURLConnection.HTTP_OK; -import static org.openqa.selenium.grid.config.StandardGridRoles.DISTRIBUTOR_ROLE; -import static org.openqa.selenium.grid.config.StandardGridRoles.EVENT_BUS_ROLE; -import static org.openqa.selenium.grid.config.StandardGridRoles.HTTPD_ROLE; -import static org.openqa.selenium.grid.config.StandardGridRoles.ROUTER_ROLE; -import static org.openqa.selenium.grid.config.StandardGridRoles.SESSION_QUEUE_ROLE; -import static org.openqa.selenium.remote.http.Route.combine; - @AutoService(CliCommand.class) public class Hub extends TemplateGridServerCommand { @@ -144,13 +144,13 @@ protected Handlers createHandlers(Config config) { networkOptions.getHttpClientFactory(tracer)); DistributorOptions distributorOptions = new DistributorOptions(config); - SessionRequestOptions sessionRequestOptions = new SessionRequestOptions(config); + NewSessionQueueOptions newSessionRequestOptions = new NewSessionQueueOptions(config); NewSessionQueue queue = new LocalNewSessionQueue( tracer, bus, distributorOptions.getSlotMatcher(), - sessionRequestOptions.getSessionRequestRetryInterval(), - sessionRequestOptions.getSessionRequestTimeout(), + newSessionRequestOptions.getSessionRequestRetryInterval(), + newSessionRequestOptions.getSessionRequestTimeout(), secret); handler.addHandler(queue); diff --git a/java/src/org/openqa/selenium/grid/commands/Standalone.java b/java/src/org/openqa/selenium/grid/commands/Standalone.java index 40c7a966f7780..e3e35b3c2a08a 100644 --- a/java/src/org/openqa/selenium/grid/commands/Standalone.java +++ b/java/src/org/openqa/selenium/grid/commands/Standalone.java @@ -17,6 +17,15 @@ package org.openqa.selenium.grid.commands; +import static java.net.HttpURLConnection.HTTP_INTERNAL_ERROR; +import static java.net.HttpURLConnection.HTTP_OK; +import static org.openqa.selenium.grid.config.StandardGridRoles.DISTRIBUTOR_ROLE; +import static org.openqa.selenium.grid.config.StandardGridRoles.HTTPD_ROLE; +import static org.openqa.selenium.grid.config.StandardGridRoles.NODE_ROLE; +import static org.openqa.selenium.grid.config.StandardGridRoles.ROUTER_ROLE; +import static org.openqa.selenium.grid.config.StandardGridRoles.SESSION_QUEUE_ROLE; +import static org.openqa.selenium.remote.http.Route.combine; + import com.google.auto.service.AutoService; import com.google.common.collect.ImmutableSet; @@ -46,7 +55,7 @@ import org.openqa.selenium.grid.sessionmap.SessionMap; import org.openqa.selenium.grid.sessionmap.local.LocalSessionMap; import org.openqa.selenium.grid.sessionqueue.NewSessionQueue; -import org.openqa.selenium.grid.sessionqueue.config.SessionRequestOptions; +import org.openqa.selenium.grid.sessionqueue.config.NewSessionQueueOptions; import org.openqa.selenium.grid.sessionqueue.local.LocalNewSessionQueue; import org.openqa.selenium.grid.web.CombinedHandler; import org.openqa.selenium.grid.web.GridUiRoute; @@ -67,15 +76,6 @@ import java.util.Set; import java.util.logging.Logger; -import static java.net.HttpURLConnection.HTTP_INTERNAL_ERROR; -import static java.net.HttpURLConnection.HTTP_OK; -import static org.openqa.selenium.grid.config.StandardGridRoles.DISTRIBUTOR_ROLE; -import static org.openqa.selenium.grid.config.StandardGridRoles.HTTPD_ROLE; -import static org.openqa.selenium.grid.config.StandardGridRoles.NODE_ROLE; -import static org.openqa.selenium.grid.config.StandardGridRoles.ROUTER_ROLE; -import static org.openqa.selenium.grid.config.StandardGridRoles.SESSION_QUEUE_ROLE; -import static org.openqa.selenium.remote.http.Route.combine; - @AutoService(CliCommand.class) public class Standalone extends TemplateGridServerCommand { @@ -142,13 +142,13 @@ protected Handlers createHandlers(Config config) { combinedHandler.addHandler(sessions); DistributorOptions distributorOptions = new DistributorOptions(config); - SessionRequestOptions sessionRequestOptions = new SessionRequestOptions(config); + NewSessionQueueOptions newSessionRequestOptions = new NewSessionQueueOptions(config); NewSessionQueue queue = new LocalNewSessionQueue( tracer, bus, distributorOptions.getSlotMatcher(), - sessionRequestOptions.getSessionRequestRetryInterval(), - sessionRequestOptions.getSessionRequestTimeout(), + newSessionRequestOptions.getSessionRequestRetryInterval(), + newSessionRequestOptions.getSessionRequestTimeout(), registrationSecret); combinedHandler.addHandler(queue); diff --git a/java/src/org/openqa/selenium/grid/sessionqueue/config/NewSessionQueueFlags.java b/java/src/org/openqa/selenium/grid/sessionqueue/config/NewSessionQueueFlags.java index dcfeb2cce48f3..eae3f49b8b237 100644 --- a/java/src/org/openqa/selenium/grid/sessionqueue/config/NewSessionQueueFlags.java +++ b/java/src/org/openqa/selenium/grid/sessionqueue/config/NewSessionQueueFlags.java @@ -18,6 +18,9 @@ package org.openqa.selenium.grid.sessionqueue.config; import static org.openqa.selenium.grid.config.StandardGridRoles.SESSION_QUEUE_ROLE; +import static org.openqa.selenium.grid.sessionqueue.config.NewSessionQueueOptions.DEFAULT_REQUEST_TIMEOUT; +import static org.openqa.selenium.grid.sessionqueue.config.NewSessionQueueOptions.DEFAULT_RETRY_INTERVAL; +import static org.openqa.selenium.grid.sessionqueue.config.NewSessionQueueOptions.SESSION_QUEUE_SECTION; import com.google.auto.service.AutoService; @@ -31,11 +34,12 @@ import java.util.Collections; import java.util.Set; +@SuppressWarnings("FieldMayBeFinal") @AutoService(HasRoles.class) public class NewSessionQueueFlags implements HasRoles { @Parameter( - names = { "--sq", "--sessionqueue" }, + names = {"--sq", "--sessionqueue"}, description = "Address of the session queue server.") @ConfigValue(section = "sessionqueue", name = "host", example = "\"http://localhost:1237\"") private URI sessionQueueServer; @@ -52,6 +56,20 @@ public class NewSessionQueueFlags implements HasRoles { @ConfigValue(section = "sessionqueue", name = "hostname", example = "\"localhost\"") private String sessionQueueServerHost; + @Parameter( + names = {"--session-request-timeout"}, + description = "Timeout in seconds. New incoming session request is added to the queue. " + + "Requests sitting in the queue for longer than the configured time will timeout.") + @ConfigValue(section = SESSION_QUEUE_SECTION, name = "session-request-timeout", example = "5") + private int sessionRequestTimeout = DEFAULT_REQUEST_TIMEOUT; + + @Parameter( + names = {"--session-retry-interval"}, + description = "Retry interval in seconds. If all slots are busy, new session request " + + "will be retried after the given interval.") + @ConfigValue(section = SESSION_QUEUE_SECTION, name = "session-retry-interval", example = "5") + private int sessionRetryInterval = DEFAULT_RETRY_INTERVAL; + @Override public Set getRoles() { return Collections.singleton(SESSION_QUEUE_ROLE); diff --git a/java/src/org/openqa/selenium/grid/sessionqueue/config/NewSessionQueueOptions.java b/java/src/org/openqa/selenium/grid/sessionqueue/config/NewSessionQueueOptions.java index 809826fe9ca06..46e6a91582b70 100644 --- a/java/src/org/openqa/selenium/grid/sessionqueue/config/NewSessionQueueOptions.java +++ b/java/src/org/openqa/selenium/grid/sessionqueue/config/NewSessionQueueOptions.java @@ -19,20 +19,29 @@ import org.openqa.selenium.grid.config.Config; import org.openqa.selenium.grid.config.ConfigException; +import org.openqa.selenium.grid.jmx.JMXHelper; +import org.openqa.selenium.grid.jmx.ManagedAttribute; +import org.openqa.selenium.grid.jmx.ManagedService; import org.openqa.selenium.grid.sessionqueue.NewSessionQueue; import java.net.URI; import java.net.URISyntaxException; +import java.time.Duration; import java.util.Optional; +@ManagedService(objectName = "org.seleniumhq.grid:type=Config,name=NewSessionQueueConfig", + description = "New session queue config") public class NewSessionQueueOptions { static final String SESSION_QUEUE_SECTION = "sessionqueue"; + static final int DEFAULT_REQUEST_TIMEOUT = 300; + static final int DEFAULT_RETRY_INTERVAL = 5; private final Config config; public NewSessionQueueOptions(Config config) { this.config = config; + new JMXHelper().register(this); } public URI getSessionQueueUri() { @@ -77,7 +86,37 @@ public URI getSessionQueueUri() { } } + public Duration getSessionRequestTimeout() { + // If the user sets 0 or less, we default to 1s. + int timeout = Math.max( + config.getInt(SESSION_QUEUE_SECTION, "session-request-timeout") + .orElse(DEFAULT_REQUEST_TIMEOUT), + 1); + + return Duration.ofSeconds(timeout); + } + + public Duration getSessionRequestRetryInterval() { + // If the user sets 0 or less, we default to 1s. + int interval = Math.max( + config.getInt(SESSION_QUEUE_SECTION, "session-retry-interval") + .orElse(DEFAULT_REQUEST_TIMEOUT), + 1); + return Duration.ofSeconds(interval); + } + + @ManagedAttribute(name = "RequestTimeoutSeconds") + public long getRequestTimeoutSeconds() { + return getSessionRequestTimeout().getSeconds(); + } + + @ManagedAttribute(name = "RetryIntervalSeconds") + public long getRetryIntervalSeconds() { + return getSessionRequestRetryInterval().getSeconds(); + } + public NewSessionQueue getSessionQueue(String implementation) { - return config.getClass(SESSION_QUEUE_SECTION, "implementation", NewSessionQueue.class, implementation); + return config + .getClass(SESSION_QUEUE_SECTION, "implementation", NewSessionQueue.class, implementation); } } diff --git a/java/src/org/openqa/selenium/grid/sessionqueue/config/SessionRequestFlags.java b/java/src/org/openqa/selenium/grid/sessionqueue/config/SessionRequestFlags.java deleted file mode 100644 index 816b60676083b..0000000000000 --- a/java/src/org/openqa/selenium/grid/sessionqueue/config/SessionRequestFlags.java +++ /dev/null @@ -1,56 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -package org.openqa.selenium.grid.sessionqueue.config; - -import com.beust.jcommander.Parameter; -import com.google.auto.service.AutoService; -import org.openqa.selenium.grid.config.ConfigValue; -import org.openqa.selenium.grid.config.HasRoles; -import org.openqa.selenium.grid.config.Role; - -import java.util.Collections; -import java.util.Set; - -import static org.openqa.selenium.grid.config.StandardGridRoles.SESSION_QUEUE_ROLE; -import static org.openqa.selenium.grid.sessionqueue.config.NewSessionQueueOptions.SESSION_QUEUE_SECTION; -import static org.openqa.selenium.grid.sessionqueue.config.SessionRequestOptions.DEFAULT_REQUEST_TIMEOUT; -import static org.openqa.selenium.grid.sessionqueue.config.SessionRequestOptions.DEFAULT_RETRY_INTERVAL; - -@SuppressWarnings("FieldMayBeFinal") -@AutoService(HasRoles.class) -public class SessionRequestFlags implements HasRoles { - - @Parameter( - names = {"--session-request-timeout"}, - description = "Timeout in seconds. New incoming session request is added to the queue. " - + "Requests sitting in the queue for longer than the configured time will timeout.") - @ConfigValue(section = SESSION_QUEUE_SECTION, name = "session-request-timeout", example = "5") - private int sessionRequestTimeout = DEFAULT_REQUEST_TIMEOUT; - - @Parameter( - names = {"--session-retry-interval"}, - description = "Retry interval in seconds. If all slots are busy, new session request " + - "will be retried after the given interval.") - @ConfigValue(section = SESSION_QUEUE_SECTION, name = "session-retry-interval", example = "5") - private int sessionRetryInterval = DEFAULT_RETRY_INTERVAL; - - @Override - public Set getRoles() { - return Collections.singleton(SESSION_QUEUE_ROLE); - } -} diff --git a/java/src/org/openqa/selenium/grid/sessionqueue/config/SessionRequestOptions.java b/java/src/org/openqa/selenium/grid/sessionqueue/config/SessionRequestOptions.java deleted file mode 100644 index 205277f42631e..0000000000000 --- a/java/src/org/openqa/selenium/grid/sessionqueue/config/SessionRequestOptions.java +++ /dev/null @@ -1,70 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -package org.openqa.selenium.grid.sessionqueue.config; - -import org.openqa.selenium.grid.config.Config; -import org.openqa.selenium.grid.jmx.JMXHelper; -import org.openqa.selenium.grid.jmx.ManagedAttribute; -import org.openqa.selenium.grid.jmx.ManagedService; - -import java.time.Duration; - -import static org.openqa.selenium.grid.sessionqueue.config.NewSessionQueueOptions.SESSION_QUEUE_SECTION; - -@ManagedService(objectName = "org.seleniumhq.grid:type=Config,name=NewSessionQueueConfig", - description = "New session queue config") -public class SessionRequestOptions { - - static final int DEFAULT_REQUEST_TIMEOUT = 300; - static final int DEFAULT_RETRY_INTERVAL = 5; - private final Config config; - - public SessionRequestOptions(Config config) { - this.config = config; - new JMXHelper().register(this); - } - - public Duration getSessionRequestTimeout() { - // If the user sets 0 or less, we default to 1s. - int timeout = Math.max( - config.getInt(SESSION_QUEUE_SECTION, "session-request-timeout") - .orElse(DEFAULT_REQUEST_TIMEOUT), - 1); - - return Duration.ofSeconds(timeout); - } - - public Duration getSessionRequestRetryInterval() { - // If the user sets 0 or less, we default to 1s. - int interval = Math.max( - config.getInt(SESSION_QUEUE_SECTION, "session-retry-interval") - .orElse(DEFAULT_REQUEST_TIMEOUT), - 1); - return Duration.ofSeconds(interval); - } - - @ManagedAttribute(name = "RequestTimeoutSeconds") - public long getRequestTimeoutSeconds() { - return getSessionRequestTimeout().getSeconds(); - } - - @ManagedAttribute(name = "RetryIntervalSeconds") - public long getRetryIntervalSeconds() { - return getSessionRequestRetryInterval().getSeconds(); - } -} diff --git a/java/src/org/openqa/selenium/grid/sessionqueue/local/LocalNewSessionQueue.java b/java/src/org/openqa/selenium/grid/sessionqueue/local/LocalNewSessionQueue.java index 511970f2c0682..9433712a1ebb2 100644 --- a/java/src/org/openqa/selenium/grid/sessionqueue/local/LocalNewSessionQueue.java +++ b/java/src/org/openqa/selenium/grid/sessionqueue/local/LocalNewSessionQueue.java @@ -1,6 +1,10 @@ package org.openqa.selenium.grid.sessionqueue.local; +import static java.net.HttpURLConnection.HTTP_INTERNAL_ERROR; +import static java.util.concurrent.TimeUnit.MILLISECONDS; + import com.google.common.annotations.VisibleForTesting; + import org.openqa.selenium.Capabilities; import org.openqa.selenium.SessionNotCreatedException; import org.openqa.selenium.events.EventBus; @@ -23,7 +27,7 @@ import org.openqa.selenium.grid.security.SecretOptions; import org.openqa.selenium.grid.server.EventBusOptions; import org.openqa.selenium.grid.sessionqueue.NewSessionQueue; -import org.openqa.selenium.grid.sessionqueue.config.SessionRequestOptions; +import org.openqa.selenium.grid.sessionqueue.config.NewSessionQueueOptions; import org.openqa.selenium.internal.Either; import org.openqa.selenium.internal.Require; import org.openqa.selenium.remote.http.Contents; @@ -54,9 +58,6 @@ import java.util.function.Predicate; import java.util.stream.Collectors; -import static java.net.HttpURLConnection.HTTP_INTERNAL_ERROR; -import static java.util.concurrent.TimeUnit.MILLISECONDS; - /** * An in-memory implementation of the list of new session requests. *

@@ -133,7 +134,7 @@ public static NewSessionQueue create(Config config) { Tracer tracer = loggingOptions.getTracer(); EventBusOptions eventBusOptions = new EventBusOptions(config); - SessionRequestOptions requestOptions = new SessionRequestOptions(config); + NewSessionQueueOptions newSessionQueueOptions = new NewSessionQueueOptions(config); SecretOptions secretOptions = new SecretOptions(config); SlotMatcher slotMatcher = new DistributorOptions(config).getSlotMatcher(); @@ -141,8 +142,8 @@ public static NewSessionQueue create(Config config) { tracer, eventBusOptions.getEventBus(), slotMatcher, - requestOptions.getSessionRequestRetryInterval(), - requestOptions.getSessionRequestTimeout(), + newSessionQueueOptions.getSessionRequestRetryInterval(), + newSessionQueueOptions.getSessionRequestTimeout(), secretOptions.getRegistrationSecret()); } diff --git a/java/test/org/openqa/selenium/grid/router/JmxTest.java b/java/test/org/openqa/selenium/grid/router/JmxTest.java index 167fd2367c894..803ce9e07c07a 100644 --- a/java/test/org/openqa/selenium/grid/router/JmxTest.java +++ b/java/test/org/openqa/selenium/grid/router/JmxTest.java @@ -17,7 +17,11 @@ package org.openqa.selenium.grid.router; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import com.google.common.collect.ImmutableMap; + import org.junit.Test; import org.openqa.selenium.Capabilities; import org.openqa.selenium.ImmutableCapabilities; @@ -31,13 +35,19 @@ import org.openqa.selenium.grid.security.Secret; import org.openqa.selenium.grid.server.BaseServerOptions; import org.openqa.selenium.grid.sessionqueue.NewSessionQueue; -import org.openqa.selenium.grid.sessionqueue.config.SessionRequestOptions; +import org.openqa.selenium.grid.sessionqueue.config.NewSessionQueueOptions; import org.openqa.selenium.grid.sessionqueue.local.LocalNewSessionQueue; import org.openqa.selenium.grid.testing.TestSessionFactory; import org.openqa.selenium.net.PortProber; import org.openqa.selenium.remote.tracing.DefaultTestTracer; import org.openqa.selenium.remote.tracing.Tracer; +import java.lang.management.ManagementFactory; +import java.net.URI; +import java.net.URISyntaxException; +import java.time.Duration; +import java.time.Instant; + import javax.management.AttributeNotFoundException; import javax.management.InstanceNotFoundException; import javax.management.IntrospectionException; @@ -48,14 +58,6 @@ import javax.management.MalformedObjectNameException; import javax.management.ObjectName; import javax.management.ReflectionException; -import java.lang.management.ManagementFactory; -import java.net.URI; -import java.net.URISyntaxException; -import java.time.Duration; -import java.time.Instant; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.Assert.fail; public class JmxTest { @@ -161,8 +163,8 @@ public void shouldBeAbleToRegisterSessionQueuerServerConfig() { new JMXHelper().unregister(name); - SessionRequestOptions queueOptions = - new SessionRequestOptions(new MapConfig(ImmutableMap.of())); + NewSessionQueueOptions newSessionQueueOptions = + new NewSessionQueueOptions(new MapConfig(ImmutableMap.of())); MBeanInfo info = beanServer.getMBeanInfo(name); assertThat(info).isNotNull(); @@ -170,10 +172,12 @@ public void shouldBeAbleToRegisterSessionQueuerServerConfig() { assertThat(attributeInfoArray).hasSize(2); String requestTimeout = (String) beanServer.getAttribute(name, "RequestTimeoutSeconds"); - assertThat(Long.parseLong(requestTimeout)).isEqualTo(queueOptions.getRequestTimeoutSeconds()); + assertThat(Long.parseLong(requestTimeout)) + .isEqualTo(newSessionQueueOptions.getRequestTimeoutSeconds()); String retryInterval = (String) beanServer.getAttribute(name, "RetryIntervalSeconds"); - assertThat(Long.parseLong(retryInterval)).isEqualTo(queueOptions.getRetryIntervalSeconds()); + assertThat(Long.parseLong(retryInterval)) + .isEqualTo(newSessionQueueOptions.getRetryIntervalSeconds()); } catch (InstanceNotFoundException | IntrospectionException | ReflectionException | MalformedObjectNameException e) { fail("Could not find the registered MBean");