-
Notifications
You must be signed in to change notification settings - Fork 80
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
feat: Add support for using JDBC Catalog for Iceberg testing #6144
Conversation
final TableDefinition td = catalogAdapter.getTableDefinition(CITIES_ID.toString(), SNAPSHOT_1_ID, null); | ||
assertThat(td).isEqualTo(CITIES_1_TD); | ||
cities1 = catalogAdapter.readTable(CITIES_ID, SNAPSHOT_1_ID); |
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.
Note to @lbooker42 , the mismatch between signature of getTableDefinition and readTable.
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.
LGTM
extensions/iceberg/src/test/java/io/deephaven/iceberg/PyIceberg1Test.java
Show resolved
Hide resolved
extensions/iceberg/src/main/java/io/deephaven/iceberg/relative/RelativeFileIO.java
Outdated
Show resolved
Hide resolved
package io.deephaven.iceberg.junit5; | ||
|
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.
Can you please use Junit4 instead of Junit5, because for my case, I will be writing deephaven tables to iceberg, and for creating these tables, I would need an execution context which so far I have been using with Junit4 using
@Rule
public final EngineCleanup framework = new EngineCleanup();
Let me know if I am missing something.
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.
It should be super simple to create JUnit 5 tests using the same logic; I don't think it's unreasonable to do this:
private EngineCleanup engineCleanup = new EngineCleanup();
@BeforeEach
void setUp() throws Exception {
engineCleanup.setUp();
}
@AfterEach
void tearDown() throws Exception {
engineCleanup.tearDown();
}
}
We could create a JUnit 5 extension to make it just as easy as @Rule
(I think I've done this on some branch, but I forget where...).
I really really really think we should be preferring JUnit 5 for new tests going forward.
I've updated io.deephaven.iceberg.junit5.CatalogAdapterBase
to use EngineCleanup
in anticipation of the ticking testing that should be upcoming.
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.
Makes sense, thanks!
Fixes #6029