-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Fix Iceberg Integration tests #34686
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
7a4a93e
3e989c2
83f880c
0423b68
8267922
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -133,6 +133,8 @@ | |
| * #numRecords()}. | ||
| */ | ||
| public abstract class IcebergCatalogBaseIT implements Serializable { | ||
| private static final long SETUP_TEARDOWN_SLEEP_MS = 5000; | ||
|
|
||
| public abstract Catalog createCatalog(); | ||
|
|
||
| public abstract Map<String, Object> managedIcebergConfig(String tableId); | ||
|
|
@@ -142,7 +144,7 @@ public void catalogSetup() throws Exception {} | |
| public void catalogCleanup() throws Exception {} | ||
|
|
||
| public Integer numRecords() { | ||
| return 1000; | ||
| return 100; | ||
| } | ||
|
|
||
| public String tableId() { | ||
|
|
@@ -159,7 +161,8 @@ public static String warehouse(Class<? extends IcebergCatalogBaseIT> testClass) | |
|
|
||
| @Before | ||
| public void setUp() throws Exception { | ||
| OPTIONS.as(DirectOptions.class).setTargetParallelism(3); | ||
| catalogName += System.nanoTime(); | ||
| OPTIONS.as(DirectOptions.class).setTargetParallelism(1); | ||
| warehouse = | ||
| String.format( | ||
| "%s/%s/%s", | ||
|
|
@@ -169,12 +172,14 @@ public void setUp() throws Exception { | |
| warehouse = warehouse(getClass()); | ||
| catalogSetup(); | ||
| catalog = createCatalog(); | ||
| Thread.sleep(SETUP_TEARDOWN_SLEEP_MS); | ||
| } | ||
|
|
||
| @After | ||
| public void cleanUp() throws Exception { | ||
| try { | ||
| catalogCleanup(); | ||
| Thread.sleep(SETUP_TEARDOWN_SLEEP_MS); | ||
| } catch (Exception e) { | ||
| LOG.warn("Catalog cleanup failed.", e); | ||
| } | ||
|
|
@@ -201,6 +206,7 @@ public void cleanUp() throws Exception { | |
| .collect(Collectors.toList()); | ||
| gcsUtil.remove(filesToDelete); | ||
| } | ||
| Thread.sleep(SETUP_TEARDOWN_SLEEP_MS); | ||
| } catch (Exception e) { | ||
| LOG.warn("Failed to clean up GCS files.", e); | ||
| } | ||
|
|
@@ -216,9 +222,9 @@ public void cleanUp() throws Exception { | |
|
|
||
| @Rule | ||
| public transient Timeout globalTimeout = | ||
| Timeout.seconds(OPTIONS.getRunner().equals(DirectRunner.class) ? 180 : 20 * 60); | ||
| Timeout.seconds(OPTIONS.getRunner().equals(DirectRunner.class) ? 300 : 20 * 60); | ||
|
|
||
| private static final int NUM_SHARDS = 10; | ||
| private static final int NUM_SHARDS = 1; | ||
|
||
| private static final Logger LOG = LoggerFactory.getLogger(IcebergCatalogBaseIT.class); | ||
| private static final Schema DOUBLY_NESTED_ROW_SCHEMA = | ||
| Schema.builder() | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since createCatalog is called in setup() which is a non-static method, salt should also be non-static member
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done