You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by je...@apache.org on 2021/01/08 15:41:48 UTC
[geode] branch develop updated: GEODE-8803:increase offset of
flakey test (#5876)
This is an automated email from the ASF dual-hosted git repository.
jensdeppe pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/develop by this push:
new 762db7e GEODE-8803:increase offset of flakey test (#5876)
762db7e is described below
commit 762db7e86d3969205e2729e4900ff997ca659b74
Author: John Hutchison <jh...@gmail.com>
AuthorDate: Fri Jan 8 10:40:57 2021 -0500
GEODE-8803:increase offset of flakey test (#5876)
-change offset to be a percentage of total commands
Co-authored-by: john Hutchison <hu...@vmware.com>
---
.../apache/geode/redis/internal/RedisStatsIntegrationTest.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/geode-redis/src/integrationTest/java/org/apache/geode/redis/internal/RedisStatsIntegrationTest.java b/geode-redis/src/integrationTest/java/org/apache/geode/redis/internal/RedisStatsIntegrationTest.java
index a8ecd26..ac072d8 100644
--- a/geode-redis/src/integrationTest/java/org/apache/geode/redis/internal/RedisStatsIntegrationTest.java
+++ b/geode-redis/src/integrationTest/java/org/apache/geode/redis/internal/RedisStatsIntegrationTest.java
@@ -452,8 +452,10 @@ public class RedisStatsIntegrationTest {
long expected =
(numberOfCommandsExecuted.get() / NUMBER_SECONDS_TO_RUN);
+
assertThat(actual_commandsProcessed.get())
- .isCloseTo(expected, Offset.offset(1d));
+ .isCloseTo(expected, Offset.offset(
+ getTenPercentOf(actual_commandsProcessed.get())));
// if time passes w/o operations
GeodeAwaitility
@@ -577,4 +579,8 @@ public class RedisStatsIntegrationTest {
public long getCurrentTime() {
return this.statisticsClock.getTime();
}
+
+ private double getTenPercentOf(Double value) {
+ return Math.ceil(value * .1);
+ }
}