jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1654777 - /jmeter/trunk/src/components/org/apache/jmeter/sampler/TestAction.java
Date Mon, 26 Jan 2015 12:27:53 GMT
Author: pmouawad
Date: Mon Jan 26 12:27:53 2015
New Revision: 1654777

URL: http://svn.apache.org/r1654777
Log:
Avoid calling TimeUnit#sleep(0)

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/sampler/TestAction.java

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=1654777&r1=1654776&r2=1654777&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/sampler/TestAction.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/sampler/TestAction.java Mon Jan 26 12:27:53
2015
@@ -118,11 +118,11 @@ public class TestAction extends Abstract
         }
         try {
             pauseThread = Thread.currentThread();
-            if(milis>=0) {
+            if(milis>0) {
                 TimeUnit.MILLISECONDS.sleep(milis);
-            } else {
+            } else if(milis<0) {
                 throw new IllegalArgumentException("Configured sleep is negative:"+milis);
-            }
+            } // else == 0 we do nothing
         } catch (InterruptedException e) {
             // NOOP
         } finally {



Mime
View raw message