jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fschumac...@apache.org
Subject [jmeter] branch master updated: Add more leeway for test duration
Date Thu, 10 Sep 2020 15:24:59 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
     new 1c6fd7e  Add more leeway for test duration
1c6fd7e is described below

commit 1c6fd7e91e89a4cb01ea9dbd75a422015ce6be3e
Author: Felix Schumacher <felix.schumacher@internetallee.de>
AuthorDate: Thu Sep 10 17:24:33 2020 +0200

    Add more leeway for test duration
---
 .../visualizers/backend/SamplerMetricFixedModeTest.java | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/src/components/src/test/java/org/apache/jmeter/visualizers/backend/SamplerMetricFixedModeTest.java
b/src/components/src/test/java/org/apache/jmeter/visualizers/backend/SamplerMetricFixedModeTest.java
index a72958f..fe15a54 100644
--- a/src/components/src/test/java/org/apache/jmeter/visualizers/backend/SamplerMetricFixedModeTest.java
+++ b/src/components/src/test/java/org/apache/jmeter/visualizers/backend/SamplerMetricFixedModeTest.java
@@ -29,6 +29,7 @@ import org.junit.jupiter.api.Test;
 public class SamplerMetricFixedModeTest {
 
     private static final int DEFAULT_ELAPSED_TIME = 1_000;
+    private static final double ALLOWED_DELTA = 25.0;
 
     @BeforeEach
     public void initMode() throws Exception {
@@ -129,16 +130,16 @@ public class SamplerMetricFixedModeTest {
         assertEquals("We are recognized as a TransactionController made sample", Boolean.TRUE,
                 Boolean.valueOf(TransactionController.isFromTransactionController(sample)));
         metric.addCumulated(sample);
-        assertEquals("Before reset  ok.max", DEFAULT_ELAPSED_TIME, metric.getOkMaxTime(),
8.001);
-        assertEquals("Before reset all.max", DEFAULT_ELAPSED_TIME, metric.getAllMaxTime(),
8.001);
+        assertEquals("Before reset  ok.max", DEFAULT_ELAPSED_TIME, metric.getOkMaxTime(),
ALLOWED_DELTA);
+        assertEquals("Before reset all.max", DEFAULT_ELAPSED_TIME, metric.getAllMaxTime(),
ALLOWED_DELTA);
         assertEquals("Before reset hits", 2, metric.getHits(), 0.0);
         assertEquals("Before reset sent bytes", 2000, metric.getSentBytes(), 0.0);
         assertEquals("Before reset received bytes", 4000, metric.getReceivedBytes(), 0.0);
 
         metric.resetForTimeInterval();
 
-        assertEquals("After reset in TIMED mode ok.max", DEFAULT_ELAPSED_TIME, metric.getOkMaxTime(),
8.001);
-        assertEquals("After reset in TIMED mode all.max", DEFAULT_ELAPSED_TIME, metric.getAllMaxTime(),
8.001);
+        assertEquals("After reset in TIMED mode ok.max", DEFAULT_ELAPSED_TIME, metric.getOkMaxTime(),
ALLOWED_DELTA);
+        assertEquals("After reset in TIMED mode all.max", DEFAULT_ELAPSED_TIME, metric.getAllMaxTime(),
ALLOWED_DELTA);
         assertEquals("After reset hits", 0, metric.getHits(), 0.0);
         assertEquals("After reset sent bytes", 0, metric.getSentBytes(), 0.0);
         assertEquals("After reset received bytes", 0, metric.getReceivedBytes(), 0.0);
@@ -151,16 +152,16 @@ public class SamplerMetricFixedModeTest {
         assertEquals("We are recognized as a TransactionController made sample", Boolean.TRUE,
                 Boolean.valueOf(TransactionController.isFromTransactionController(sample)));
         metric.addCumulated(sample);
-        assertEquals("Before reset  ko.max", DEFAULT_ELAPSED_TIME, metric.getKoMaxTime(),
8.001);
-        assertEquals("Before reset all.max", DEFAULT_ELAPSED_TIME, metric.getAllMaxTime(),
8.001);
+        assertEquals("Before reset  ko.max", DEFAULT_ELAPSED_TIME, metric.getKoMaxTime(),
ALLOWED_DELTA);
+        assertEquals("Before reset all.max", DEFAULT_ELAPSED_TIME, metric.getAllMaxTime(),
ALLOWED_DELTA);
         assertEquals("Before reset failures", 1, metric.getFailures(), 0.0);
         assertEquals("Before reset sent bytes", 2000, metric.getSentBytes(), 0.0);
         assertEquals("Before reset received bytes", 4000, metric.getReceivedBytes(), 0.0);
 
         metric.resetForTimeInterval();
 
-        assertEquals("After reset in TIMED mode ko.max", DEFAULT_ELAPSED_TIME, metric.getKoMaxTime(),
8.001);
-        assertEquals("After reset in TIMED mode all.max", DEFAULT_ELAPSED_TIME, metric.getAllMaxTime(),
8.001);
+        assertEquals("After reset in TIMED mode ko.max", DEFAULT_ELAPSED_TIME, metric.getKoMaxTime(),
ALLOWED_DELTA);
+        assertEquals("After reset in TIMED mode all.max", DEFAULT_ELAPSED_TIME, metric.getAllMaxTime(),
ALLOWED_DELTA);
         assertEquals("After reset failures", 0, metric.getFailures(), 0.0);
         assertEquals("After reset sent bytes", 0, metric.getSentBytes(), 0.0);
         assertEquals("After reset received bytes", 0, metric.getReceivedBytes(), 0.0);


Mime
View raw message