You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by al...@apache.org on 2019/10/18 01:37:30 UTC

[kudu] branch branch-1.11.x updated: [java] Fix TestKuduPartitioner errorprone warning

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

alexey pushed a commit to branch branch-1.11.x
in repository https://gitbox.apache.org/repos/asf/kudu.git


The following commit(s) were added to refs/heads/branch-1.11.x by this push:
     new 7dcce94  [java] Fix TestKuduPartitioner errorprone warning
7dcce94 is described below

commit 7dcce9411e3613cd9b6c51f261f9bbc84d9d6c6d
Author: Grant Henke <gr...@apache.org>
AuthorDate: Thu Oct 17 12:04:48 2019 -0500

    [java] Fix TestKuduPartitioner errorprone warning
    
    This fixes the following errorprone warning:
    
    Expression of type int may overflow before being assigned to a long
    long upperBound = timeoutMs * 2; // Add 100% to avoid flakiness.
    
    Change-Id: I9fd41b7cae9502468728efbdf51e3d7191447371
    Reviewed-on: http://gerrit.cloudera.org:8080/14488
    Tested-by: Kudu Jenkins
    Reviewed-by: Adar Dembo <ad...@cloudera.com>
    (cherry picked from commit fd66fc5ec83bf0d14fe391dddd74793bde532e5f)
    Reviewed-on: http://gerrit.cloudera.org:8080/14496
    Reviewed-by: Alexey Serbin <as...@cloudera.com>
---
 .../src/test/java/org/apache/kudu/client/TestKuduPartitioner.java       | 2 +-
 1 file changed, 1 insertion(+), 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 400c8e6..1153051 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,7 @@ public class TestKuduPartitioner {
       assertTrue(ex.getMessage().startsWith("cannot complete before timeout"));
     }
     long elapsed = System.currentTimeMillis() - now;
-    long upperBound = timeoutMs * 2; // Add 100% to avoid flakiness.
+    long upperBound = timeoutMs * 2L; // Add 100% to avoid flakiness.
     assertTrue(String.format("Elapsed time %d exceeded upper bound %d", elapsed, upperBound),
                elapsed <= upperBound);
   }