You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iceberg.apache.org by pv...@apache.org on 2021/04/14 07:33:57 UTC
[iceberg] branch master updated: Hive: Add timeout for
TestHiveIcebergStorageHandlerWithEngine tests (#2448)
This is an automated email from the ASF dual-hosted git repository.
pvary pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iceberg.git
The following commit(s) were added to refs/heads/master by this push:
new c3640af Hive: Add timeout for TestHiveIcebergStorageHandlerWithEngine tests (#2448)
c3640af is described below
commit c3640afadc5af759bee531368c8be16e2a2b7f5d
Author: pvary <pv...@cloudera.com>
AuthorDate: Wed Apr 14 09:33:34 2021 +0200
Hive: Add timeout for TestHiveIcebergStorageHandlerWithEngine tests (#2448)
---
.../mr/hive/TestHiveIcebergStorageHandlerWithEngine.java | 11 ++++++++---
.../test/java/org/apache/iceberg/mr/hive/TestHiveShell.java | 2 +-
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/mr/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergStorageHandlerWithEngine.java b/mr/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergStorageHandlerWithEngine.java
index 23404b8..aca5c04 100644
--- a/mr/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergStorageHandlerWithEngine.java
+++ b/mr/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergStorageHandlerWithEngine.java
@@ -24,6 +24,7 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;
+import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import org.apache.hadoop.hive.ql.exec.mr.ExecMapper;
import org.apache.iceberg.FileFormat;
@@ -48,6 +49,7 @@ import org.junit.BeforeClass;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
+import org.junit.rules.Timeout;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@@ -135,6 +137,9 @@ public class TestHiveIcebergStorageHandlerWithEngine {
@Rule
public TemporaryFolder temp = new TemporaryFolder();
+ @Rule
+ public Timeout timeout = new Timeout(40000, TimeUnit.MILLISECONDS);
+
@BeforeClass
public static void beforeClass() {
shell = HiveIcebergStorageHandlerTestUtils.shell();
@@ -244,7 +249,7 @@ public class TestHiveIcebergStorageHandlerWithEngine {
Assert.assertArrayEquals(new Object[] {102L, 1L, 33.33d}, rows.get(2));
}
- @Test
+ @Test(timeout = 100000)
public void testJoinTablesSupportedTypes() throws IOException {
for (int i = 0; i < SUPPORTED_TYPES.size(); i++) {
Type type = SUPPORTED_TYPES.get(i);
@@ -267,7 +272,7 @@ public class TestHiveIcebergStorageHandlerWithEngine {
}
}
- @Test
+ @Test(timeout = 100000)
public void testSelectDistinctFromTable() throws IOException {
for (int i = 0; i < SUPPORTED_TYPES.size(); i++) {
Type type = SUPPORTED_TYPES.get(i);
@@ -310,7 +315,7 @@ public class TestHiveIcebergStorageHandlerWithEngine {
HiveIcebergTestUtils.validateData(table, HiveIcebergStorageHandlerTestUtils.CUSTOMER_RECORDS, 0);
}
- @Test
+ @Test(timeout = 100000)
public void testInsertSupportedTypes() throws IOException {
Assume.assumeTrue("Tez write is not implemented yet", executionEngine.equals("mr"));
for (int i = 0; i < SUPPORTED_TYPES.size(); i++) {
diff --git a/mr/src/test/java/org/apache/iceberg/mr/hive/TestHiveShell.java b/mr/src/test/java/org/apache/iceberg/mr/hive/TestHiveShell.java
index 2f700f8..6ffd3ef 100644
--- a/mr/src/test/java/org/apache/iceberg/mr/hive/TestHiveShell.java
+++ b/mr/src/test/java/org/apache/iceberg/mr/hive/TestHiveShell.java
@@ -79,7 +79,7 @@ public class TestHiveShell {
public void start() {
// Create a copy of the HiveConf for the metastore
- metastore.start(new HiveConf(hs2Conf));
+ metastore.start(new HiveConf(hs2Conf), 10);
hs2Conf.setVar(HiveConf.ConfVars.METASTOREURIS, metastore.hiveConf().getVar(HiveConf.ConfVars.METASTOREURIS));
hs2Conf.setVar(HiveConf.ConfVars.METASTOREWAREHOUSE,
metastore.hiveConf().getVar(HiveConf.ConfVars.METASTOREWAREHOUSE));