parquet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ziva...@apache.org
Subject parquet-mr git commit: PARQUET-1208: Occasional endless loop in unit test
Date Mon, 19 Feb 2018 17:38:51 GMT
Repository: parquet-mr
Updated Branches:
  refs/heads/master 445cb9dc2 -> ad80bfe55


PARQUET-1208: Occasional endless loop in unit test

Author: Zoltan Ivanfi <zi@cloudera.com>

Closes #455 from zivanfi/PARQUET-1208 and squashes the following commits:

665ba37 [Zoltan Ivanfi] PARQUET-1208: Addressing Ryan's comments.
2ff96a3 [Zoltan Ivanfi] PARQUET-1208: Occasional endless loop in unit test


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

Branch: refs/heads/master
Commit: ad80bfe559e7380fedd7998daea5f27393ab643b
Parents: 445cb9d
Author: Zoltan Ivanfi <zi@cloudera.com>
Authored: Mon Feb 19 18:37:54 2018 +0100
Committer: Zoltan Ivanfi <zi@cloudera.com>
Committed: Mon Feb 19 18:37:54 2018 +0100

----------------------------------------------------------------------
 .../parquet/format/converter/TestParquetMetadataConverter.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/parquet-mr/blob/ad80bfe5/parquet-hadoop/src/test/java/org/apache/parquet/format/converter/TestParquetMetadataConverter.java
----------------------------------------------------------------------
diff --git a/parquet-hadoop/src/test/java/org/apache/parquet/format/converter/TestParquetMetadataConverter.java
b/parquet-hadoop/src/test/java/org/apache/parquet/format/converter/TestParquetMetadataConverter.java
index ee92d46..b83da5d 100644
--- a/parquet-hadoop/src/test/java/org/apache/parquet/format/converter/TestParquetMetadataConverter.java
+++ b/parquet-hadoop/src/test/java/org/apache/parquet/format/converter/TestParquetMetadataConverter.java
@@ -289,13 +289,13 @@ public class TestParquetMetadataConverter {
   public void randomTestFilterMetaData() {
     // randomized property based testing
     // if it fails add the case above
-    Random random = new Random(System.currentTimeMillis());
+    Random random = new Random(42);
     for (int j = 0; j < 100; j++) {
       long[] rgs = new long[random.nextInt(50)];
       for (int i = 0; i < rgs.length; i++) {
         rgs[i] = random.nextInt(10000) + 1; // No empty row groups
       }
-      int splitSize = random.nextInt(10000);
+      int splitSize = random.nextInt(10000) + 1; // 0 would lead to an infinite loop
       try {
         verifyAllFilters(metadata(rgs), splitSize);
       } catch (AssertionError e) {


Mime
View raw message