changeset 794:3143f2ca9ee7

HttpMessageModificationFilterNodeDefCreator $setContent definition bugfix
author Devel 2
date Thu, 21 Dec 2017 10:26:18 +0100
parents 59759c2a2d79
children 315469a3b03c
files stress-tester/src/main/java/com/passus/st/client/http/HttpSynchClientWorker.java stress-tester/src/main/java/com/passus/st/client/http/filter/HttpHostRewriterFilter.java stress-tester/src/main/java/com/passus/st/client/http/filter/HttpMessageModificationFilter.java
diffstat 3 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/stress-tester/src/main/java/com/passus/st/client/http/HttpSynchClientWorker.java	Thu Dec 21 09:45:23 2017 +0100
+++ b/stress-tester/src/main/java/com/passus/st/client/http/HttpSynchClientWorker.java	Thu Dec 21 10:26:18 2017 +0100
@@ -257,7 +257,7 @@
                     } catch (InterruptedException ignore) {
                     }
 
-                    boolean nextPoll = true;
+                    boolean nextPoll;
                     do {
                         if (loopEnd || !working) {
                             break;
--- a/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpHostRewriterFilter.java	Thu Dec 21 09:45:23 2017 +0100
+++ b/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpHostRewriterFilter.java	Thu Dec 21 10:26:18 2017 +0100
@@ -164,7 +164,7 @@
         @Override
         public NodeDefinition create() {
             return mapDef(
-                    tupleDef("hostMap", new MappingNodeDefinition().setMinNumberOfValues(1))
+                    tupleDef("hostMap", new MappingNodeDefinition().setMinChildrenNum(1))
             );
         }
     }
--- a/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpMessageModificationFilter.java	Thu Dec 21 09:45:23 2017 +0100
+++ b/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpMessageModificationFilter.java	Thu Dec 21 10:26:18 2017 +0100
@@ -9,7 +9,9 @@
 import static com.passus.config.schema.ConfigurationSchemaBuilder.mixedDef;
 import static com.passus.config.schema.ConfigurationSchemaBuilder.tupleDef;
 import static com.passus.config.schema.ConfigurationSchemaBuilder.valueDef;
+import static com.passus.config.schema.ConfigurationSchemaBuilder.mappingDef;
 import com.passus.config.schema.KeyNameVaryListNodeDefinition;
+import com.passus.config.schema.MappingNodeDefinition;
 import com.passus.config.schema.NodeDefinition;
 import com.passus.config.schema.NodeDefinitionCreator;
 import com.passus.data.ByteString;
@@ -582,9 +584,7 @@
                     )
             );
 
-            HeaderOperationNodeDefinition contentNodeDef = new HeaderOperationNodeDefinition(
-                    valueDef()
-            );
+            MappingNodeDefinition contentNodeDef = new MappingNodeDefinition();
 
             KeyNameVaryListNodeDefinition operationsDef = new KeyNameVaryListNodeDefinition()
                     .setNodeTransformer(new HttpMessageModificationFilterTransformer())
@@ -600,7 +600,7 @@
                     .add("$removeQueryParam", paramNodeDef)
                     .add("$addQueryParam", paramNodeDef)
                     .add("$setQueryParam", paramNodeDef)
-                    .add("$setContent", contentNodeDef);
+                    .add("$setContent", mappingDef().setChildrenNum(1));
 
             return mapDef(
                     tupleDef("operations", operationsDef),