kbendick commented on a change in pull request #3801:
URL: https://github.com/apache/iceberg/pull/3801#discussion_r775771611



##########
File path: core/src/test/java/org/apache/iceberg/hadoop/TestCachingCatalog.java
##########
@@ -257,6 +264,44 @@ public void 
testCacheExpirationEagerlyRemovesMetadataTables() throws IOException
             catalog.cache().asMap().containsKey(metadataTable)));
   }
 
+  @Test
+  @Ignore("reproduces https://github.com/apache/iceberg/issues/3791";)
+  public void testDeadlock() throws IOException, InterruptedException {
+    HadoopCatalog underlyingCatalog = hadoopCatalog();
+    TestableCachingCatalog catalog = 
TestableCachingCatalog.wrap(underlyingCatalog, Duration.ofSeconds(1), ticker);
+    Namespace namespace = Namespace.of("db", "ns1", "ns2");
+    int numThreads = 20;
+    for (int i = 0; i < numThreads; i++) {
+      TableIdentifier tableIdent = TableIdentifier.of(namespace, "tbl" + i);
+      catalog.createTable(tableIdent, SCHEMA, SPEC, ImmutableMap.of("key", 
"value"));

Review comment:
       Nit / being good citizens: Please make sure all of these tables get 
dropped at the end test. Maybe make a list of table names and then you can 
place a finally block or an `@After` function somehow.
   
   Let me know if you'd like any help in sorting that out structurally etc 🙂




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

Reply via email to