accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [2/3] accumulo git commit: ACCUMULO-4434 Reduce stringency on success condition for CompactionRateLimitingIT
Date Wed, 31 Aug 2016 23:03:09 GMT
ACCUMULO-4434 Reduce stringency on success condition for CompactionRateLimitingIT

The guava RateLimiter implementation is bursty and causes
this test to fail.


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/a4fdcf20
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/a4fdcf20
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/a4fdcf20

Branch: refs/heads/master
Commit: a4fdcf20568d75115e0d46a073d55d797d7402bf
Parents: 2c50d63
Author: Josh Elser <elserj@apache.org>
Authored: Wed Aug 31 18:46:49 2016 -0400
Committer: Josh Elser <elserj@apache.org>
Committed: Wed Aug 31 18:46:49 2016 -0400

----------------------------------------------------------------------
 .../java/org/apache/accumulo/test/CompactionRateLimitingIT.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/a4fdcf20/test/src/main/java/org/apache/accumulo/test/CompactionRateLimitingIT.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/CompactionRateLimitingIT.java b/test/src/main/java/org/apache/accumulo/test/CompactionRateLimitingIT.java
index 6aa6930..3b218e2 100644
--- a/test/src/main/java/org/apache/accumulo/test/CompactionRateLimitingIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/CompactionRateLimitingIT.java
@@ -74,8 +74,9 @@ public class CompactionRateLimitingIT extends ConfigurableMacBase {
     long compactionStart = System.currentTimeMillis();
     conn.tableOperations().compact(tableName, null, null, false, true);
     long duration = System.currentTimeMillis() - compactionStart;
+    // The rate will be "bursty", try to account for that by taking 80% of the expected rate
(allow for 20% under the maximum expected duration)
     Assert.assertTrue(
         String.format("Expected a compaction rate of no more than %,d bytes/sec, but saw
a rate of %,f bytes/sec", RATE, 1000.0 * bytesWritten / duration),
-        duration > 1000L * BYTES_TO_WRITE / RATE);
+        duration > 1000L * 0.8 * BYTES_TO_WRITE / RATE);
   }
 }


Mime
View raw message