X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=netconf%2Ftools%2Fnetconf-testtool%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fnetconf%2Ftest%2Ftool%2Fclient%2Fstress%2FStressClientCallable.java;h=62733ba81656ca6d182c42c7c0b244975364a0c5;hb=29c57bb8a9d5f6cecd2c890c614709b83a7f516e;hp=d808f2bf5d6802ec7f5d63ec85f4c80d1508bf99;hpb=587f3257393e79c720f88d41b8f3f65a600d32df;p=netconf.git diff --git a/netconf/tools/netconf-testtool/src/main/java/org/opendaylight/netconf/test/tool/client/stress/StressClientCallable.java b/netconf/tools/netconf-testtool/src/main/java/org/opendaylight/netconf/test/tool/client/stress/StressClientCallable.java index d808f2bf5d..62733ba816 100644 --- a/netconf/tools/netconf-testtool/src/main/java/org/opendaylight/netconf/test/tool/client/stress/StressClientCallable.java +++ b/netconf/tools/netconf-testtool/src/main/java/org/opendaylight/netconf/test/tool/client/stress/StressClientCallable.java @@ -5,7 +5,6 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ - package org.opendaylight.netconf.test.tool.client.stress; import io.netty.util.concurrent.GlobalEventExecutor; @@ -43,17 +42,17 @@ public class StressClientCallable implements Callable { final NetconfClientDispatcherImpl netconfClientDispatcher, final List preparedMessages) { this.params = params; - this.sessionListener = getSessionListener(params.getInetAddress(), params.concurrentMessageLimit); + sessionListener = getSessionListener(params.getInetAddress(), params.concurrentMessageLimit); this.netconfClientDispatcher = netconfClientDispatcher; - cfg = getNetconfClientConfiguration(this.params, this.sessionListener); + cfg = getNetconfClientConfiguration(this.params, sessionListener); LOG.info("Connecting to netconf server {}:{}", params.ip, params.port); try { netconfClientSession = netconfClientDispatcher.createClient(cfg).get(); } catch (final InterruptedException e) { - throw new RuntimeException(e); + throw new IllegalStateException(e); } catch (final ExecutionException e) { - throw new RuntimeException("Unable to connect", e); + throw new IllegalStateException("Unable to connect", e); } executionStrategy = getExecutionStrategy(params, preparedMessages, sessionListener); } @@ -89,7 +88,7 @@ public class StressClientCallable implements Callable { netconfClientConfigurationBuilder.withSessionListener(sessionListener); netconfClientConfigurationBuilder.withAddress(params.getInetAddress()); if (params.tcpHeader != null) { - final String header = params.tcpHeader.replaceAll("\"", "").trim() + "\n"; + final String header = params.tcpHeader.replace("\"", "").trim() + "\n"; netconfClientConfigurationBuilder.withAdditionalHeader( new NetconfHelloMessageAdditionalHeader(null, null, null, null, null) { @Override