This is an automated email from the ASF dual-hosted git repository. adar pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/kudu.git
commit f73671a5a619d543dcda61179388c496a7ca1352 Author: Adar Dembo <[email protected]> AuthorDate: Mon Sep 30 22:44:54 2019 -0700 TestKuduPartitioner: deflake testBuildTimeout I saw a RELEASE build where the time taken by KuduPartitionerBuilder.build() exceeded 110% of the timeout value. This was anticipated in code review[1], but instead of removing this part of the test altogether, let's just make it more lenient. 1. https://gerrit.cloudera.org/c/12275/6/java/kudu-client/src/test/java/org/apache/kudu/client/TestKuduPartitioner.java#192 Change-Id: I9e734eb8321b6633d1999e2dd031d355ce299b86 Reviewed-on: http://gerrit.cloudera.org:8080/14331 Tested-by: Adar Dembo <[email protected]> Reviewed-by: Grant Henke <[email protected]> --- .../src/test/java/org/apache/kudu/client/TestKuduPartitioner.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/java/kudu-client/src/test/java/org/apache/kudu/client/TestKuduPartitioner.java b/java/kudu-client/src/test/java/org/apache/kudu/client/TestKuduPartitioner.java index 743926c..400c8e6 100644 --- a/java/kudu-client/src/test/java/org/apache/kudu/client/TestKuduPartitioner.java +++ b/java/kudu-client/src/test/java/org/apache/kudu/client/TestKuduPartitioner.java @@ -184,7 +184,9 @@ public class TestKuduPartitioner { assertTrue(ex.getMessage().startsWith("cannot complete before timeout")); } long elapsed = System.currentTimeMillis() - now; - assertTrue(elapsed <= timeoutMs * 1.1); // Add 10% to avoid flakiness. + long upperBound = timeoutMs * 2; // Add 100% to avoid flakiness. + assertTrue(String.format("Elapsed time %d exceeded upper bound %d", elapsed, upperBound), + elapsed <= upperBound); } @Test
