This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git

commit 42c805b00fbd02e3ffce18187967bdc870dc35a1
Author: Vladimir Sitnikov <[email protected]>
AuthorDate: Fri Oct 18 22:58:36 2019 +0300

    Fix RunTimeSpec: tolerance should be used for both sides of the value
---
 .../src/test/groovy/org/apache/jmeter/control/RunTimeSpec.groovy    | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/src/components/src/test/groovy/org/apache/jmeter/control/RunTimeSpec.groovy 
b/src/components/src/test/groovy/org/apache/jmeter/control/RunTimeSpec.groovy
index 1e69fcb..e12dd3b 100644
--- 
a/src/components/src/test/groovy/org/apache/jmeter/control/RunTimeSpec.groovy
+++ 
b/src/components/src/test/groovy/org/apache/jmeter/control/RunTimeSpec.groovy
@@ -66,12 +66,12 @@ class RunTimeSpec extends Specification {
             long elapsed = System.currentTimeMillis() - now
         then:
             sut.getIterCount() == 1
-            loopCount >= expectedLoops
+            loopCount >= expectedLoops - tolerance
             loopCount <= expectedLoops + tolerance
-            elapsed >= runTimeMillis
+            elapsed >= runTimeMillis - (tolerance * samplerWaitTime)
             elapsed <= runTimeMillis + (tolerance * samplerWaitTime)
             samp1.getSamples() == sampler1Loops
-            samp2.getSamples() >= expectedLoops - sampler1Loops
+            samp2.getSamples() >= expectedLoops - sampler1Loops - tolerance
             samp2.getSamples() <= expectedLoops - sampler1Loops + tolerance
     }
 

Reply via email to