You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by vl...@apache.org on 2019/05/27 09:44:05 UTC

svn commit: r1860117 - /jmeter/trunk/test/src/org/apache/jmeter/timers/ConstantThroughputTimerTest.java

Author: vladimirsitnikov
Date: Mon May 27 09:44:05 2019
New Revision: 1860117

URL: http://svn.apache.org/viewvc?rev=1860117&view=rev
Log:
Use assumeTrue in testTimerBSH so it is properly marked as skipped in case it is skipped

Modified:
    jmeter/trunk/test/src/org/apache/jmeter/timers/ConstantThroughputTimerTest.java

Modified: jmeter/trunk/test/src/org/apache/jmeter/timers/ConstantThroughputTimerTest.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/timers/ConstantThroughputTimerTest.java?rev=1860117&r1=1860116&r2=1860117&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/timers/ConstantThroughputTimerTest.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/timers/ConstantThroughputTimerTest.java Mon May 27 09:44:05 2019
@@ -27,6 +27,7 @@ import org.apache.jmeter.threads.TestJMe
 import org.apache.jmeter.util.BeanShellInterpreter;
 import org.apache.jmeter.util.ScriptingTestElement;
 import org.junit.Assert;
+import org.junit.Assume;
 import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -91,11 +92,8 @@ public class ConstantThroughputTimerTest
 
     @Test
     public void testTimerBSH() throws Exception {
-        if (!BeanShellInterpreter.isInterpreterPresent()){
-            final String msg = "BeanShell jar not present, test ignored";
-            log.warn(msg);
-            return;
-        }
+        Assume.assumeTrue("BeanShell jar should be on the classpath, otherwise the test makes no sense",
+                BeanShellInterpreter.isInterpreterPresent());
         BeanShellTimer timer = new BeanShellTimer();
         
         timer.setScript("\"60\"");