danielcweeks commented on code in PR #11093:
URL: https://github.com/apache/iceberg/pull/11093#discussion_r1841393266
##########
spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/TestBaseWithCatalog.java:
##########
@@ -59,20 +87,29 @@ protected static Object[][] parameters() {
}
@BeforeAll
- public static void createWarehouse() throws IOException {
+ public static void setUpAll() throws IOException {
TestBaseWithCatalog.warehouse = File.createTempFile("warehouse", null);
assertThat(warehouse.delete()).isTrue();
+ restCatalog = REST_SERVER_EXTENSION.client();
Review Comment:
I feel like we're almost there, but we're still doing too much here that
should be one in the extension.
We should make this test base implement either the `BeforeAllCallback` or
the `BeforeEachCallback` which allows for using the extension store:
```java
@Override
public void beforeAll(ExtensionContext extensionContext) {
restCatalog = (RESTCatalog)
extensionContext.getStore(ExtensionContext.Namespace.create("rest")).get("rest-catalog");
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]