thads       2004/04/19 10:52:30

  Modified:    src/core/org/apache/jmeter/control IfController.java
  Log:
  Modified IfController to turn off caching for FunctionProperty
  
  Revision  Changes    Path
  1.4       +10 -5     
jakarta-jmeter/src/core/org/apache/jmeter/control/IfController.java
  
  Index: IfController.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jmeter/src/core/org/apache/jmeter/control/IfController.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- IfController.java 14 Feb 2004 03:34:29 -0000      1.3
  +++ IfController.java 19 Apr 2004 17:52:30 -0000      1.4
  @@ -19,14 +19,17 @@
   package org.apache.jmeter.control;
   
   import java.io.Serializable;
  +
  +import org.apache.jmeter.junit.JMeterTestCase;
   import org.apache.jmeter.samplers.Sampler;
   import org.apache.jmeter.testelement.TestElement;
  +import org.apache.jmeter.testelement.property.FunctionProperty;
  +import org.apache.jmeter.testelement.property.JMeterProperty;
   import org.apache.jmeter.testelement.property.StringProperty;
   import org.apache.jorphan.logging.LoggingManager;
   import org.apache.log.Logger;
   import org.mozilla.javascript.Context;
   import org.mozilla.javascript.Scriptable;
  -import org.apache.jmeter.junit.JMeterTestCase;
   
   /**
    * 
  @@ -83,7 +86,10 @@
           * Condition Accessor - this is gonna be like     ${count}<10
           */
          public String getCondition() {
  -                     return getPropertyAsString(CONDITION);
  +                     JMeterProperty prop = getProperty(CONDITION);
  +                     if (prop instanceof FunctionProperty)
  +                             ((FunctionProperty)prop).setUseCache(false);
  +                     return prop.getStringValue();
          }
   
          /**
  @@ -138,7 +144,6 @@
           * I.e. if the condition evaluates to False - then isDone() returns TRUE
           */
          public boolean isDone() {
  -
                        boolean result = true;
                        try {
                                  result = !evaluateCondition();
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to