You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by la...@apache.org on 2018/05/31 15:03:16 UTC

calcite git commit: [CALCITE-2341] Fix ImmutableBitSetTest for jdk11

Repository: calcite
Updated Branches:
  refs/heads/master 074d37a03 -> 39fee5d63


[CALCITE-2341] Fix ImmutableBitSetTest for jdk11

Fix ImmutableBitSetTest#testShift test failure with jdk11, caused
by a change in the error message thrown by jdk11

Close apache/calcite#711


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

Branch: refs/heads/master
Commit: 39fee5d636867a6b1ddf8a5d5bc2d38482c7d33c
Parents: 074d37a
Author: Laurent Goujon <la...@apache.org>
Authored: Wed May 30 19:40:00 2018 -0700
Committer: Laurent Goujon <la...@dremio.com>
Committed: Thu May 31 07:52:24 2018 -0700

----------------------------------------------------------------------
 .../test/java/org/apache/calcite/util/ImmutableBitSetTest.java    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/calcite/blob/39fee5d6/core/src/test/java/org/apache/calcite/util/ImmutableBitSetTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/calcite/util/ImmutableBitSetTest.java b/core/src/test/java/org/apache/calcite/util/ImmutableBitSetTest.java
index 9ae81d0..680bed4 100644
--- a/core/src/test/java/org/apache/calcite/util/ImmutableBitSetTest.java
+++ b/core/src/test/java/org/apache/calcite/util/ImmutableBitSetTest.java
@@ -31,6 +31,7 @@ import java.util.List;
 import java.util.Set;
 import java.util.SortedMap;
 
+import static org.hamcrest.CoreMatchers.anyOf;
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.CoreMatchers.sameInstance;
@@ -508,7 +509,7 @@ public class ImmutableBitSetTest {
       final ImmutableBitSet x = bitSet.shift(-5);
       fail("Expected error, got " + x);
     } catch (ArrayIndexOutOfBoundsException e) {
-      assertThat(e.getMessage(), is("-1"));
+      assertThat(e.getMessage(), anyOf(is("-1"), is("Index -1 out of bounds for length 0")));
     }
     final ImmutableBitSet empty = ImmutableBitSet.of();
     assertThat(empty.shift(-100), is(empty));