Mercurial > stress-tester
changeset 802:01ee64902f6a
unit test fixed
author | Devel 1 |
---|---|
date | Thu, 04 Jan 2018 10:15:56 +0100 |
parents | f07a59880d45 |
children | 91e8f64cae1e |
files | stress-tester/src/main/java/com/passus/st/client/http/filter/HttpSequenceFilter.java stress-tester/src/test/java/com/passus/st/client/http/HttpSynchClientWorkerTest.java stress-tester/src/test/java/com/passus/st/client/http/filter/HttpSequenceFilterTest.java |
diffstat | 3 files changed, 8 insertions(+), 48 deletions(-) [+] |
line wrap: on
line diff
--- a/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpSequenceFilter.java Thu Jan 04 08:58:13 2018 +0100 +++ b/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpSequenceFilter.java Thu Jan 04 10:15:56 2018 +0100 @@ -27,7 +27,6 @@ import com.passus.net.http.HttpResponse; import com.passus.st.client.http.HttpFlowContext; import com.passus.st.client.http.ReporterDestination; -import com.passus.st.client.http.ReporterRemoteDestination; import com.passus.st.filter.Transformers; import com.passus.st.plugin.PluginConstants; import java.io.Serializable; @@ -206,8 +205,8 @@ } public void updateValue(HttpMessageWrapper wrapper) { - valueMap.put("req", wrapper.getReq()); - valueMap.put("resp", wrapper.getResp()); + valueMap.put("@req", wrapper.getReq()); + valueMap.put("@resp", wrapper.getResp()); } public void persistsValue(HttpMessageWrapper wrapper, String[] aliases) { @@ -317,8 +316,8 @@ // TODO: refactor final Map<String, Object> valueMap = new HashMap<>(); - valueMap.put("req", value.getReq()); - valueMap.put("resp", value.getResp()); + valueMap.put("@req", value.getReq()); + valueMap.put("@resp", value.getResp()); if (seqItems[0].match(valueMap)) { SeqChain chain = new SeqChain(seqItems, now, valueMap);
--- a/stress-tester/src/test/java/com/passus/st/client/http/HttpSynchClientWorkerTest.java Thu Jan 04 08:58:13 2018 +0100 +++ b/stress-tester/src/test/java/com/passus/st/client/http/HttpSynchClientWorkerTest.java Thu Jan 04 10:15:56 2018 +0100 @@ -29,45 +29,6 @@ */ public class HttpSynchClientWorkerTest { - public HttpSynchClientWorkerTest() { - } - - @Test - public void testIsWorking() { - } - - @Test - public void testGetEventsQueueWaitTime() { - } - - @Test - public void testSetEventsQueueWaitTime() { - } - - @Test - public void testSessionInvalidated() throws Exception { - } - - @Test - public void testFlowStateChanged() { - } - - @Test - public void testHandle() { - } - - @Test - public void testCloseAllConnections() { - } - - @Test - public void testClose() { - } - - @Test - public void testRun() { - } - private static class LocalEmitter implements Emitter { private SessionMapper sessionMapper = new PassThroughSessionMapper();
--- a/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpSequenceFilterTest.java Thu Jan 04 08:58:13 2018 +0100 +++ b/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpSequenceFilterTest.java Thu Jan 04 10:15:56 2018 +0100 @@ -67,10 +67,10 @@ item("{\"@req.getHeader('xyz')\": \"abc\", \"@req.getCookie('id')\": \"@_i0.resp.getCookie('id')\"}", 1, "last"),}; Map<String, ValueExtractor> values = new HashMap<>(); - values.put("code", value("_i0.resp.status.code")); - values.put("xhost", value("_i0.req.url.host")); - values.put("header", value("_i1.req.getHeader('xyz')")); - values.put("cookie", value("last.req.getCookie('id')")); + values.put("code", value("@_i0.resp.status.code")); + values.put("xhost", value("@_i0.req.url.host")); + values.put("header", value("@_i1.req.getHeader('xyz')")); + values.put("cookie", value("@last.req.getCookie('id')")); values.put("seqName", value("example sequence")); HttpSequenceFilter filter = new HttpSequenceFilter().instanceForWorker(0);