This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-vfs.git

commit e42f65deab183a6b919a04f15892004cc3f5f2e5
Author: Gary Gregory <[email protected]>
AuthorDate: Tue Mar 30 08:34:50 2021 -0400

    Sort methods.
---
 .../commons/vfs2/impl/DefaultFileSystemManagerTest.java    | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git 
a/commons-vfs2/src/test/java/org/apache/commons/vfs2/impl/DefaultFileSystemManagerTest.java
 
b/commons-vfs2/src/test/java/org/apache/commons/vfs2/impl/DefaultFileSystemManagerTest.java
index 51b829c..2b8f8c2 100644
--- 
a/commons-vfs2/src/test/java/org/apache/commons/vfs2/impl/DefaultFileSystemManagerTest.java
+++ 
b/commons-vfs2/src/test/java/org/apache/commons/vfs2/impl/DefaultFileSystemManagerTest.java
@@ -79,7 +79,7 @@ public class DefaultFileSystemManagerTest {
     }
 
     @Test
-    public void testFileCacheEmptyAfterVFSClose() throws FileSystemException {
+    public void testFileCacheEmptyAfterManagerClose() throws 
FileSystemException {
         final FileSystemManager manager = VFS.getManager();
         Assert.assertNotNull(manager);
         try (final FileObject fileObject = manager
@@ -89,14 +89,17 @@ public class DefaultFileSystemManagerTest {
             final FileName name = fileObject.getName();
             // Make sure we have file object in the cache.
             
Assert.assertNotNull(filesCache.getFile(fileObject.getFileSystem(), name));
-            VFS.close();
+            manager.close();
             // Cache MUST now be empty.
             Assert.assertNull(filesCache.getFile(fileObject.getFileSystem(), 
name));
+        } finally {
+            // Makes sure we reset the singleton or other tests will fail.
+            VFS.close();
         }
     }
 
     @Test
-    public void testFileCacheEmptyAfterManagerClose() throws 
FileSystemException {
+    public void testFileCacheEmptyAfterVFSClose() throws FileSystemException {
         final FileSystemManager manager = VFS.getManager();
         Assert.assertNotNull(manager);
         try (final FileObject fileObject = manager
@@ -106,12 +109,9 @@ public class DefaultFileSystemManagerTest {
             final FileName name = fileObject.getName();
             // Make sure we have file object in the cache.
             
Assert.assertNotNull(filesCache.getFile(fileObject.getFileSystem(), name));
-            manager.close();
+            VFS.close();
             // Cache MUST now be empty.
             Assert.assertNull(filesCache.getFile(fileObject.getFileSystem(), 
name));
-        } finally {
-            // Makes sure we reset the singleton or other tests will fail.
-            VFS.close();
         }
     }
 

Reply via email to