vlsi commented on code in PR #6256:
URL: https://github.com/apache/jmeter/pull/6256#discussion_r1536763273


##########
src/core/src/testFixtures/java/org/apache/jmeter/junit/JMeterTestCase.java:
##########
@@ -41,7 +41,7 @@
  * {@code @Isolated}.
  */
 @Isolated
-public abstract class JMeterTestCase {
+public abstract class  JMeterTestCase {

Review Comment:
   Please refrain from making changes that are not a part of the PR



##########
src/components/src/main/java/org/apache/jmeter/extractor/RegexExtractor.java:
##########
@@ -244,8 +256,8 @@ private String getInputString(SampleResult result) {
                 : useBodyAsDocument() ? 
Document.getTextFromDocument(result.getResponseData())
                 : result.getResponseDataAsString() // Bug 36898
                 ;
-       log.debug("Input = '{}'", inputString);
-       return inputString;
+        log.debug("Input = '{}'", inputString);
+        return inputString;

Review Comment:
   Please refrain from making changes that are not a part of the PR



##########
src/components/src/main/java/org/apache/jmeter/extractor/RegexExtractor.java:
##########
@@ -178,6 +182,14 @@ private void extractWithOroRegex(SampleResult 
previousResult, JMeterVariables va
         }
     }
 
+    private void failResult(SampleResult previousResult){
+        previousResult.setSuccessful(false);
+        AssertionResult res = new AssertionResult(getName());
+        res.setFailure(true);
+        res.setFailureMessage("Pattern not found: " + getRegex());

Review Comment:
   I suggest including the "source" that was checked against the regexp. In 
other words, something like `Pattern ... not found in ...<response body | ... >"



##########
src/components/src/main/java/org/apache/jmeter/extractor/RegexExtractor.java:
##########
@@ -472,7 +484,7 @@ private void initTemplate() {
         PatternMatcher matcher = JMeterUtils.getMatcher();
         Pattern templatePattern = 
JMeterUtils.getPatternCache().getPattern("\\$(\\d+)\\$"  // $NON-NLS-1$
                 , Perl5Compiler.READ_ONLY_MASK
-                | Perl5Compiler.SINGLELINE_MASK);
+                        | Perl5Compiler.SINGLELINE_MASK);

Review Comment:
   Please refrain from making changes that are not a part of the PR



##########
src/components/src/main/java/org/apache/jmeter/extractor/RegexExtractor.java:
##########
@@ -57,7 +58,7 @@ public class RegexExtractor extends AbstractScopedTestElement 
implements PostPro
      *  These are passed to the setUseField() method
      *
      *  Do not change these values!
-    */
+     */

Review Comment:
   Please refrain from making changes that are not a part of the PR



##########
src/dist-check/src/test/java/org/apache/jmeter/junit/JMeterTest.java:
##########
@@ -382,6 +382,7 @@ public void GUIComponents2(GuiComponentHolder 
componentHolder) throws Exception
         
IGNORED_PROPERTIES.add(LoopControllerSchema.INSTANCE.getContinueForever());
         IGNORED_PROPERTIES.add(RegexExtractorSchema.INSTANCE.getMatchTarget());
         
IGNORED_PROPERTIES.add(RegexExtractorSchema.INSTANCE.getDefaultIsEmpty());
+        
IGNORED_PROPERTIES.add(RegexExtractorSchema.INSTANCE.getFailIfNotFound());

Review Comment:
   Could you clarify why adding the property here? Ideally the list of "ignored 
properties" should be empty. I should add a clarification javadoc to 
`IGNORED_PROPERTIES` so it clarifies its purpose.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to