Author: pmouawad
Date: Fri Mar 11 21:11:18 2016
New Revision: 1734632

URL: http://svn.apache.org/viewvc?rev=1734632&view=rev
Log:
Bug 59076 - Test should fail if a module controller cannot find its replacement 
subtree
Bugzilla Id: 59076

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/control/ModuleController.java
    jmeter/trunk/xdocs/changes.xml

Modified: 
jmeter/trunk/src/components/org/apache/jmeter/control/ModuleController.java
URL: 
http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/control/ModuleController.java?rev=1734632&r1=1734631&r2=1734632&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/control/ModuleController.java 
(original)
+++ jmeter/trunk/src/components/org/apache/jmeter/control/ModuleController.java 
Fri Mar 11 21:11:18 2016
@@ -32,6 +32,7 @@ import org.apache.jmeter.testelement.pro
 import org.apache.jmeter.testelement.property.NullProperty;
 import org.apache.jorphan.collections.HashTree;
 import org.apache.jorphan.collections.ListedHashTree;
+import org.apache.jorphan.util.JMeterStopTestNowException;
 
 /**
  * The goal of ModuleController is to add modularity to JMeter. The general 
idea
@@ -136,6 +137,10 @@ public class ModuleController extends Ge
             if (nodePathList != null && nodePathList.size() > 0) {
                 traverse(context, nodePathList, 1);
             }
+
+            if(isRunningVersion() && selectedNode == null) {
+                throw new 
JMeterStopTestNowException("ModuleController:"+getName()+" has no selected 
Controller, test was stopped as a consequence");
+            }
         }
     }
 

Modified: jmeter/trunk/xdocs/changes.xml
URL: 
http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1734632&r1=1734631&r2=1734632&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Fri Mar 11 21:11:18 2016
@@ -341,6 +341,7 @@ Summary
     <li><bug>58678</bug>Module Controller : limit target element selection. 
Contributed by Benoit Wiart (benoit dot wiart at gmail.com)</li>
     <li><bug>58714</bug>Module controller : it should not be possible to add a 
timer as child. Contributed by Benoit Wiart (benoit dot wiart at gmail.com)</li>
     <li><bug>59067</bug>JMeter fails to iterate over Controllers that are 
children of a TransactionController having "Generate parent sample" checked 
after an assertion error occurs on a Thread Group with "Start Next Thread 
Loop". Contributed by Benoit Wiart(benoit dot wiart at gmail.com)</li>
+    <li><bug>59076</bug>Test should fail if a module controller cannot find 
its replacement subtree</li>
 </ul>
 
 <h3>Listeners</h3>


Reply via email to