haizhou-zhao commented on code in PR #11093:
URL: https://github.com/apache/iceberg/pull/11093#discussion_r1797318587


##########
spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/TestBaseWithCatalog.java:
##########
@@ -59,18 +71,47 @@ protected static Object[][] parameters() {
   }
 
   @BeforeAll
-  public static void createWarehouse() throws IOException {
+  public static void createWarehouseAndStartRest() throws IOException {
     TestBaseWithCatalog.warehouse = File.createTempFile("warehouse", null);
     assertThat(warehouse.delete()).isTrue();
+    try {
+      restServer = new RESTCatalogServer();
+      // prevent using already-in-use port when testing
+      System.setProperty("rest.port", 
String.valueOf(MetaStoreUtils.findFreePort()));
+      System.setProperty(CatalogProperties.WAREHOUSE_LOCATION, 
warehouse.getAbsolutePath());
+      // In-memory sqlite database by default is private to the connection 
that created it.
+      // If more than 1 jdbc connection backed by in-memory sqlite is created 
behind one
+      // JdbcCatalog, then different jdbc connections could provide different 
views of table
+      // status even belonging to the same catalog. Reference:
+      // https://www.sqlite.org/inmemorydb.html
+      System.setProperty(CatalogProperties.CLIENT_POOL_SIZE, "1");

Review Comment:
   Yes, this is needed for test to pass. I attempted to run test without this 
line and here're the result: 
https://github.com/apache/iceberg/actions/runs/11297060489/job/31423193928?pr=11093



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