dimas-b commented on code in PR #6656: URL: https://github.com/apache/iceberg/pull/6656#discussion_r1087949854
########## nessie/src/test/java/org/apache/iceberg/nessie/TestNessieCatalog.java: ########## @@ -70,12 +72,14 @@ public class TestNessieCatalog extends CatalogTests<NessieCatalog> { private String uri; @BeforeEach - public void beforeEach(@NessieUri URI nessieUri) throws IOException { - this.uri = nessieUri.toString(); - this.api = HttpClientBuilder.builder().withUri(this.uri).build(NessieApiV1.class); - - initialHashOfDefaultBranch = api.getDefaultBranch().getHash(); - + public void setUp(NessieClientFactory clientFactory, @NessieClientUri URI nessieUri) { + api = clientFactory.make(); + try { + initialHashOfDefaultBranch = api.getDefaultBranch().getHash(); + } catch (NessieNotFoundException e) { Review Comment: Why not declare the exception as thrown by this method? JUnit 5 can deal with that and the code will be simpler and easier to read :thinking: -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org