changeset 642:af2640f52b66

minor
author Devel 1
date Tue, 07 Nov 2017 16:24:51 +0100
parents 5d0230a77b38
children 32c92600da57
files stress-tester-reporter/src/main/java/com/passus/st/reporter/trx/ServerMain.java stress-tester-reporter/src/test/java/com/passus/st/reporter/server/TestCustom.java
diffstat 2 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/stress-tester-reporter/src/main/java/com/passus/st/reporter/trx/ServerMain.java	Tue Nov 07 13:54:16 2017 +0100
+++ b/stress-tester-reporter/src/main/java/com/passus/st/reporter/trx/ServerMain.java	Tue Nov 07 16:24:51 2017 +0100
@@ -5,7 +5,6 @@
 import static com.passus.st.reporter.snmp.Main.create;
 import com.passus.st.reporter.snmp.SnmpLogger;
 import com.passus.st.utils.CliUtils;
-import static com.passus.st.utils.CliUtils.option;
 import java.io.IOException;
 import java.net.InetSocketAddress;
 import org.apache.commons.cli.CommandLine;
@@ -20,7 +19,7 @@
  */
 public class ServerMain {
 
-    static final int PORT = 11111;
+    public static final int PORT = 11111;
 
     public static void main(String[] args) throws IOException {
         final Options options = new Options();
--- a/stress-tester-reporter/src/test/java/com/passus/st/reporter/server/TestCustom.java	Tue Nov 07 13:54:16 2017 +0100
+++ b/stress-tester-reporter/src/test/java/com/passus/st/reporter/server/TestCustom.java	Tue Nov 07 16:24:51 2017 +0100
@@ -5,6 +5,7 @@
 import com.passus.st.reporter.trx.ReporterDispatcher;
 import com.passus.st.reporter.trx.ReporterEncoder;
 import com.passus.st.reporter.trx.NettyReporterServer;
+import com.passus.st.reporter.trx.ServerMain;
 import com.passus.st.reporter.trx.SocketReporterClient;
 import java.io.DataOutputStream;
 import java.net.InetSocketAddress;
@@ -18,6 +19,7 @@
  */
 public class TestCustom {
 
+    static final InetSocketAddress ADDRESS = new InetSocketAddress("localhost", 11111);
     static final TestMetric METRIC = new TestMetric();
 
     public static void main(String[] args) throws Exception {
@@ -58,7 +60,7 @@
     }
 
     static void client() throws Exception {
-        SocketReporterClient rc = new SocketReporterClient(Test.ADDRESS, 1);
+        SocketReporterClient rc = new SocketReporterClient(ADDRESS, 1);
         rc.start();
         rc.send(METRIC);
         rc.waitForEmptyQueue();