Mercurial > stress-tester
changeset 1108:27b0c92658b0
tests bugfix
author | Devel 2 |
---|---|
date | Tue, 19 May 2020 13:51:19 +0200 |
parents | b626a5120c4f |
children | 736e2559c13c |
files | stress-tester/src/test/java/com/passus/st/client/AbstractFlowWorkerTest.java stress-tester/src/test/java/com/passus/st/client/FlowWorkerBaseTest.java |
diffstat | 2 files changed, 8 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/stress-tester/src/test/java/com/passus/st/client/AbstractFlowWorkerTest.java Tue May 19 13:46:36 2020 +0200 +++ b/stress-tester/src/test/java/com/passus/st/client/AbstractFlowWorkerTest.java Tue May 19 13:51:19 2020 +0200 @@ -6,11 +6,8 @@ import com.passus.data.DataEncoder; import com.passus.data.HeapByteBuff; import com.passus.net.SocketAddress; -import com.passus.net.http.HttpRequest; import com.passus.net.http.HttpResponse; import com.passus.net.http.HttpResponseEncoder; -import com.passus.st.Log4jConfigurationFactory; -import com.passus.st.client.SynchFlowWorker.SynchWrapper; import com.passus.st.emitter.*; import com.passus.st.metric.MetricsContainer; import com.passus.st.utils.EventUtils; @@ -48,6 +45,8 @@ private final ExecutorService executor = Executors.newSingleThreadExecutor(); + private Timeouts timeouts = new Timeouts(); + public LocalEmitter() { this(HttpResponseEncoder.INSTANCE); } @@ -68,12 +67,12 @@ @Override public void setTimeouts(Timeouts timeouts) { - + this.timeouts = timeouts; } @Override public Timeouts getTimeouts() { - return null; + return timeouts; } @Override
--- a/stress-tester/src/test/java/com/passus/st/client/FlowWorkerBaseTest.java Tue May 19 13:46:36 2020 +0200 +++ b/stress-tester/src/test/java/com/passus/st/client/FlowWorkerBaseTest.java Tue May 19 13:51:19 2020 +0200 @@ -25,6 +25,10 @@ private final Emitter mockEmitter = mock(Emitter.class); + { + when(mockEmitter.getTimeouts()).thenReturn(new Timeouts()); + } + private ChannelContext mockChannelContext() { return mockChannelContext(session); }