Author: pmouawad Date: Tue Nov 14 21:23:28 2017 New Revision: 1815269 URL: http://svn.apache.org/viewvc?rev=1815269&view=rev Log: Bug 61762 - Start Next Thread Loop should be used everywhere Bugzilla Id: 61762
Modified: jmeter/trunk/src/components/org/apache/jmeter/sampler/TestAction.java jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterContext.java jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterThread.java jmeter/trunk/xdocs/changes.xml jmeter/trunk/xdocs/usermanual/component_reference.xml Modified: jmeter/trunk/src/components/org/apache/jmeter/sampler/TestAction.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/sampler/TestAction.java?rev=1815269&r1=1815268&r2=1815269&view=diff ============================================================================== --- jmeter/trunk/src/components/org/apache/jmeter/sampler/TestAction.java (original) +++ jmeter/trunk/src/components/org/apache/jmeter/sampler/TestAction.java Tue Nov 14 21:23:28 2017 @@ -104,7 +104,7 @@ public class TestAction extends Abstract } } else if (action == RESTART_NEXT_LOOP) { log.info("Restarting next loop from element {}", getName()); - context.setRestartNextLoop(true); + context.setStartNextThreadLoop(true); } return null; // This means no sample is saved Modified: jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties?rev=1815269&r1=1815268&r2=1815269&view=diff ============================================================================== --- jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties (original) +++ jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties Tue Nov 14 21:23:28 2017 @@ -1175,7 +1175,7 @@ test=Test test_action_action=Action test_action_duration=Duration (milliseconds) test_action_pause=Pause -test_action_restart_next_loop=Go to next loop iteration +test_action_restart_next_loop=Start Next Thread Loop test_action_stop=Stop test_action_stop_now=Stop Now test_action_target=Target Modified: jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties?rev=1815269&r1=1815268&r2=1815269&view=diff ============================================================================== --- jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties (original) +++ jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties Tue Nov 14 21:23:28 2017 @@ -1165,7 +1165,7 @@ test=Test test_action_action=Action \: test_action_duration=Dur\u00E9e (millisecondes) \: test_action_pause=Mettre en pause -test_action_restart_next_loop=Passer \u00E0 l'it\u00E9ration suivante de la boucle +test_action_restart_next_loop=D\u00E9marrer it\u00E9ration suivante test_action_stop=Arr\u00EAter test_action_stop_now=Arr\u00EAter imm\u00E9diatement test_action_target=Cible \: Modified: jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterContext.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterContext.java?rev=1815269&r1=1815268&r2=1815269&view=diff ============================================================================== --- jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterContext.java (original) +++ jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterContext.java Tue Nov 14 21:23:28 2017 @@ -170,21 +170,47 @@ public class JMeterContext { } /** - * if set to <code>true</code> a restart of the loop will occurs + * if set to <code>true</code> a restart of the loop will occur * * @param restartNextLoop * flag whether restart will occur */ - public void setRestartNextLoop(boolean restartNextLoop) { + public void setStartNextThreadLoop(boolean restartNextLoop) { this.restartNextLoop = restartNextLoop; } + + /** + * if set to <code>true</code> current loop iteration will be interrupted and + * JMeter will go to next iteration + * + * @param restartNextLoop + * flag whether restart will occur + */ + public boolean isStartNextThreadLoop() { + return restartNextLoop; + } + + /** + * if set to <code>true</code> current loop iteration will be interrupted and + * JMeter will go to next iteration + * + * @param restartNextLoop + * flag whether restart will occur + * @deprecated use {@link JMeterContext#setStartNextThreadLoop(boolean)} + */ + @Deprecated + public void setRestartNextLoop(boolean restartNextLoop) { + setStartNextThreadLoop(restartNextLoop); + } /** * a restart of the loop was required ? * @return the restartNextLoop + * @deprecated use {@link JMeterContext#isRestartNextLoop()} */ + @Deprecated public boolean isRestartNextLoop() { - return restartNextLoop; + return isStartNextThreadLoop(); } /** Modified: jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterThread.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterThread.java?rev=1815269&r1=1815268&r2=1815269&view=diff ============================================================================== --- jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterThread.java (original) +++ jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterThread.java Tue Nov 14 21:23:28 2017 @@ -269,7 +269,7 @@ public class JMeterThread implements Run triggerEndOfLoopOnParentControllers(sam, threadContext); sam = null; threadContext.getVariables().put(LAST_SAMPLE_OK, TRUE); - threadContext.setRestartNextLoop(false); + threadContext.setStartNextThreadLoop(false); } else { sam = threadGroupLoopController.next(); @@ -543,7 +543,7 @@ public class JMeterThread implements Run stopTestNow(); } if(result.isStartNextThreadLoop()) { - threadContext.setRestartNextLoop(true); + threadContext.setStartNextThreadLoop(true); } } else { compiler.done(pack); // Finish up Modified: jmeter/trunk/xdocs/changes.xml URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1815269&r1=1815268&r2=1815269&view=diff ============================================================================== --- jmeter/trunk/xdocs/changes.xml [utf-8] (original) +++ jmeter/trunk/xdocs/changes.xml [utf-8] Tue Nov 14 21:23:28 2017 @@ -98,6 +98,7 @@ Summary <h3>Other samplers</h3> <ul> <li><bug>61739</bug>Java Request / JavaSamplerClient : Improve <code>org.apache.jmeter.protocol.java.sampler.JavaSamplerContext</code></li> + <li><bug>61762</bug>Start Next Thread Loop should be used everywhere</li> </ul> <h3>Controllers</h3> Modified: jmeter/trunk/xdocs/usermanual/component_reference.xml URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/usermanual/component_reference.xml?rev=1815269&r1=1815268&r2=1815269&view=diff ============================================================================== --- jmeter/trunk/xdocs/usermanual/component_reference.xml (original) +++ jmeter/trunk/xdocs/usermanual/component_reference.xml Tue Nov 14 21:23:28 2017 @@ -6345,7 +6345,7 @@ Behaviour can be modified with some prop The possible choices are: <ul> <li><code>Continue</code> - ignore the error and continue with the test</li> - <li><code>Start Next Loop</code> - ignore the error, start next loop and continue with the test</li> + <li><code>Start Next Thread Loop</code> - ignore the error, start next loop and continue with the test</li> <li><code>Stop Thread</code> - current thread exits</li> <li><code>Stop Test</code> - the entire test is stopped at the end of any current samples.</li> <li><code>Stop Test Now</code> - the entire test is stopped abruptly. Any current samplers are interrupted if possible.</li>