jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1769215 - in /jmeter/trunk: src/components/org/apache/jmeter/control/ModuleController.java xdocs/changes.xml
Date Thu, 10 Nov 2016 22:23:16 GMT
Author: pmouawad
Date: Thu Nov 10 22:23:16 2016
New Revision: 1769215

URL: http://svn.apache.org/viewvc?rev=1769215&view=rev
Log:
Bug 60361 - ModuleController : If a Test plan contains a Module Controller which references
an unexistant Controller, JMeter in GUI mode will not stop
Bugzilla Id: 60361

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=1769215&r1=1769214&r2=1769215&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/control/ModuleController.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/control/ModuleController.java Thu Nov 10
22:23:16 2016
@@ -138,11 +138,25 @@ public class ModuleController extends Ge
                 traverse(context, nodePathList, 1);
             }
 
-            if(isRunningVersion() && selectedNode == null) {
+            if(hasReplacementOccured() && selectedNode == null) {
                 throw new JMeterStopTestException("ModuleController:"+getName()+" has no
selected Controller (did you rename some element in the path to target controller?), test
was shutdown as a consequence");
             }
         }
     }
+    
+    /**
+     * In GUI Mode replacement occurs when test start
+     * In Non GUI Mode replacement occurs before test runs
+     * @return true if replacement occured at the time method is called
+     */
+    private boolean hasReplacementOccured() {
+        if(GuiPackage.getInstance() != null) {
+            // GUI Mode
+            return isRunningVersion();
+        } else {
+            return true;
+        }
+    }
 
     private void traverse(JMeterTreeNode node, List<?> nodePath, int level) {
         if (node != null && nodePath.size() > level) {

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1769215&r1=1769214&r2=1769215&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml [utf-8] (original)
+++ jmeter/trunk/xdocs/changes.xml [utf-8] Thu Nov 10 22:23:16 2016
@@ -302,6 +302,7 @@ The HTML source code in the Results Tree
 
 <h3>Controllers</h3>
 <ul>
+    <li><bug>60361</bug>ModuleController : If a Test plan contains a Module
Controller which references an unexistant Controller, JMeter in GUI mode will not stop</li>
 </ul>
 
 <h3>Listeners</h3>



Mime
View raw message