yuqi1129 commented on code in PR #9282:
URL: https://github.com/apache/gravitino/pull/9282#discussion_r2591320459


##########
catalogs/catalog-fileset/src/test/java/org/apache/gravitino/catalog/fileset/TestFilesetCatalogOperations.java:
##########
@@ -1868,6 +1874,42 @@ public void testGetTargetLocation() throws IOException {
     }
   }
 
+  @Test
+  @Timeout(15)
+  void testGetFileSystemTimeoutThrowsException() throws Exception {
+    FieldUtils.writeField(
+        GravitinoEnv.getInstance(), "entityStore", new 
RelationalEntityStore(), true);
+
+    try (FilesetCatalogOperations filesetCatalogOperations = new 
FilesetCatalogOperations()) {
+      LocalFileSystemProvider localFileSystemProvider = 
Mockito.mock(LocalFileSystemProvider.class);
+      when(localFileSystemProvider.scheme()).thenReturn("file");
+      when(localFileSystemProvider.getFileSystem(Mockito.any(Path.class), 
Mockito.anyMap()))
+          .thenAnswer(
+              invocation -> {
+                // Block 100s, however, the timeout is set to 6s by default in
+                // FilesetCatalogOperations, so it's expected to be over 
within 10s
+                Awaitility.await().forever().until(() -> false);

Review Comment:
   `Thread.sleep(Long.MAX_VALUE)` is not suggested to use here. 



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

Reply via email to