-
Notifications
You must be signed in to change notification settings - Fork 383
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#480] test(lakehouse-iceberg): add hive catalog to IcebergRESTServic…
…eIT (#493) ### What changes were proposed in this pull request? add hive catalog to IcebergRESTServiceIT 1. custom graviton config file with different Iceberg catalog types 2. The hive catalog warehouse location is using localfs to bypass HDFS 3. unify test namespace to `iceberg_rest_` prefix, to drop all test namespace and tables before each test. ### Why are the changes needed? Part of: #480 ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? 1. existing UTs 4. HiveCatalog UTs
- Loading branch information
Showing
9 changed files
with
480 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...tion-test/src/main/java/com/datastrato/graviton/integration/test/MiniGravitonContext.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
* Copyright 2023 Datastrato. | ||
* This software is licensed under the Apache License version 2. | ||
*/ | ||
|
||
package com.datastrato.graviton.integration.test; | ||
|
||
import java.util.Map; | ||
|
||
public class MiniGravitonContext { | ||
Map<String, String> customConfig; | ||
|
||
public MiniGravitonContext(Map<String, String> customConfig) { | ||
this.customConfig = customConfig; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
...astrato/graviton/integration/test/catalog/lakehouse/iceberg/IcebergRESTHiveCatalogIT.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* Copyright 2023 Datastrato. | ||
* This software is licensed under the Apache License version 2. | ||
*/ | ||
|
||
package com.datastrato.graviton.integration.test.catalog.lakehouse.iceberg; | ||
|
||
import com.datastrato.graviton.catalog.lakehouse.iceberg.IcebergCatalogBackend; | ||
import org.junit.jupiter.api.Tag; | ||
import org.junit.jupiter.api.TestInstance; | ||
import org.junit.jupiter.api.TestInstance.Lifecycle; | ||
|
||
// Hive&Jdbc catalog must be tested with graviton-docker-it env, | ||
// so we should create a separate class instead using junit `parameterized test` | ||
// to auto-generate catalog type | ||
@Tag("graviton-docker-it") | ||
@TestInstance(Lifecycle.PER_CLASS) | ||
public class IcebergRESTHiveCatalogIT extends IcebergRESTServiceIT { | ||
public IcebergRESTHiveCatalogIT() { | ||
catalogType = IcebergCatalogBackend.HIVE; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.