danielcweeks commented on code in PR #11093:
URL: https://github.com/apache/iceberg/pull/11093#discussion_r1824709276


##########
open-api/src/testFixtures/java/org/apache/iceberg/rest/RCKUtils.java:
##########
@@ -107,4 +116,18 @@ static void purgeCatalogTestEntries(RESTCatalog catalog) {
               catalog.dropNamespace(namespace);
             });
   }
+
+  public static int findFreePort() {
+    ServerSocket socket;
+    int port;
+    try {
+      socket = new ServerSocket(0);
+      port = socket.getLocalPort();
+      socket.close();
+    } catch (IOException e) {
+      throw new RuntimeException(e);

Review Comment:
   Nit:  This could use try-with-resources and we should probably use 
UncheckedIOException rather than RE.



-- 
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

Reply via email to