changeset 1022:fa7ecf793f0c

UnidirectionalUdpPcapEmitter - 2 bugs fixed
author Devel 1
date Mon, 30 Mar 2020 15:27:57 +0200
parents 7a4efb7ff5b4
children 831da81c262f
files stress-tester/src/main/java/com/passus/st/emitter/pcap/UnidirectionalUdpPcapEmitter.java stress-tester/src/test/java/com/passus/st/emitter/pcap/UnidirectionalPcapWorkerTest.java
diffstat 2 files changed, 6 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/stress-tester/src/main/java/com/passus/st/emitter/pcap/UnidirectionalUdpPcapEmitter.java	Mon Mar 30 13:41:01 2020 +0200
+++ b/stress-tester/src/main/java/com/passus/st/emitter/pcap/UnidirectionalUdpPcapEmitter.java	Mon Mar 30 15:27:57 2020 +0200
@@ -13,8 +13,6 @@
 
     private boolean started = false;
 
-    private MACAddressResolver macAddressResolver;
-
     private UnidirectionalPcapWorker[] workers;
 
     private int workersNum = DEFAULT_WORKERS_NUM;
@@ -46,13 +44,12 @@
         this.workersNum = workersNum;
     }
 
-    public MACAddressResolver getMacAddressResolver() {
-        return macAddressResolver;
+    public MACAddressResolver getMacResolver() {
+        return macResolver;
     }
 
-    public void setMacAddressResolver(MACAddressResolver macAddressResolver) {
-        Assert.notNull(macAddressResolver);
-        this.macAddressResolver = macAddressResolver;
+    public void setMacResolver(MACAddressResolver macResolver) {
+        this.macResolver = macResolver;
     }
 
     public PortPool getPortPool() {
@@ -95,6 +92,7 @@
             UnidirectionalPcapWorker worker = new UnidirectionalPcapWorker();
             worker.setPortPool(portPool);
             worker.setMacResolver(macResolver);
+            worker.setSessionMapper(sessionMapper);
             worker.start();
             workers[i] = worker;
         }
--- a/stress-tester/src/test/java/com/passus/st/emitter/pcap/UnidirectionalPcapWorkerTest.java	Mon Mar 30 13:41:01 2020 +0200
+++ b/stress-tester/src/test/java/com/passus/st/emitter/pcap/UnidirectionalPcapWorkerTest.java	Mon Mar 30 15:27:57 2020 +0200
@@ -83,7 +83,7 @@
         }
     }
 
-    private class TestPortPool implements PortPool {
+    static class TestPortPool implements PortPool {
 
         public static final int PORT = 100;