jsalvata    2003/12/01 12:15:16

  Modified:    src/protocol/http/org/apache/jmeter/protocol/http/proxy
                        ProxyControl.java
  Log:
  Honour enabled/disabled flag when notifying listeners.
  
  Revision  Changes    Path
  1.37      +20 -14    
jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java
  
  Index: ProxyControl.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- ProxyControl.java 1 Dec 2003 01:19:14 -0000       1.36
  +++ ProxyControl.java 1 Dec 2003 20:15:16 -0000       1.37
  @@ -622,13 +622,15 @@
           JMeterTreeNode myNode = treeModel.getNodeOf(this);
           Enumeration enum = myNode.children();
           while (enum.hasMoreElements())
  -        {
  +        { 
               JMeterTreeNode subNode =
                   (JMeterTreeNode) enum.nextElement();
  -            TestElement testElement =
  -                (TestElement) subNode.createTestElement();
  -            if (testElement instanceof SampleListener) {
  -                ((SampleListener)testElement).sampleOccurred(event);
  +            if (subNode.isEnabled()) {
  +                TestElement testElement =
  +                    (TestElement) subNode.createTestElement();
  +                if (testElement instanceof SampleListener) {
  +                    ((SampleListener)testElement).sampleOccurred(event);
  +                }
               }
           }
       }
  @@ -646,10 +648,12 @@
           {
               JMeterTreeNode subNode =
                   (JMeterTreeNode) enum.nextElement();
  -            TestElement testElement =
  -                (TestElement) subNode.createTestElement();
  -            if (testElement instanceof TestListener) {
  -                ((TestListener)testElement).testStarted();
  +            if (subNode.isEnabled()) {
  +                TestElement testElement =
  +                    (TestElement) subNode.createTestElement();
  +                if (testElement instanceof TestListener) {
  +                    ((TestListener)testElement).testStarted();
  +                }
               }
           }
       }
  @@ -667,10 +671,12 @@
           {
               JMeterTreeNode subNode =
                   (JMeterTreeNode) enum.nextElement();
  -            TestElement testElement =
  -                (TestElement) subNode.createTestElement();
  -            if (testElement instanceof TestListener) {
  -                ((TestListener)testElement).testEnded();
  +            if (subNode.isEnabled()) {
  +                TestElement testElement =
  +                    (TestElement) subNode.createTestElement();
  +                if (testElement instanceof TestListener) {
  +                    ((TestListener)testElement).testEnded();
  +                }
               }
           }
       }
  
  
  

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

Reply via email to