Description
https://issues.apache.org/jira/browse/STORM-2095 introduced a test to verify that a blob store can be deleted even if the directory for that store is not empty, which can happen if temporary files are left in the directory after a Nimbus crash. This test fails consistently on Windows because it tries to delete a temporary file while also holding an open OutputStream to that file. This causes a DirectoryNotEmptyException when trying to delete the blob store directory.
Stack trace:
java.lang.RuntimeException: java.nio.file.DirectoryNotEmptyException: /mnt/c/Users/Esran/Documents/NetbeansProjects/storm/storm-server/target/blob-store-test-3f653994-c8e4-4215-a623-93168911596c/blobs/1017/data_test at sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:242) at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103) at java.nio.file.Files.delete(Files.java:1126) at org.apache.storm.blobstore.FileBlobStoreImpl$2.postVisitDirectory(FileBlobStoreImpl.java:255) at org.apache.storm.blobstore.FileBlobStoreImpl$2.postVisitDirectory(FileBlobStoreImpl.java:245) at java.nio.file.Files.walkFileTree(Files.java:2688) at java.nio.file.Files.walkFileTree(Files.java:2742) at org.apache.storm.blobstore.FileBlobStoreImpl.delete(FileBlobStoreImpl.java:245) at org.apache.storm.blobstore.FileBlobStoreImpl.deleteKey(FileBlobStoreImpl.java:182) at org.apache.storm.blobstore.LocalFsBlobStore.deleteKeyIgnoringFileNotFound(LocalFsBlobStore.java:255) at org.apache.storm.blobstore.LocalFsBlobStore.deleteBlob(LocalFsBlobStore.java:240) at org.apache.storm.blobstore.LocalFsBlobStore$$EnhancerByMockitoWithCGLIB$$bb9ed11f.CGLIB$deleteBlob$9(<generated>) at org.apache.storm.blobstore.LocalFsBlobStore$$EnhancerByMockitoWithCGLIB$$bb9ed11f$$FastClassByMockitoWithCGLIB$$bc6695db.invoke(<generated>) at org.mockito.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:216) at org.mockito.internal.creation.AbstractMockitoMethodProxy.invokeSuper(AbstractMockitoMethodProxy.java:10) at org.mockito.internal.invocation.realmethod.CGLIBProxyRealMethod.invoke(CGLIBProxyRealMethod.java:22) at org.mockito.internal.invocation.realmethod.FilteredCGLIBProxyRealMethod.invoke(FilteredCGLIBProxyRealMethod.java:27) at org.mockito.internal.invocation.InvocationImpl.callRealMethod(InvocationImpl.java:108) at org.mockito.internal.stubbing.answers.CallsRealMethods.answer(CallsRealMethods.java:36) at org.mockito.internal.handler.MockHandlerImpl.handle(MockHandlerImpl.java:93) at org.mockito.internal.handler.NullResultGuardian.handle(NullResultGuardian.java:29) at org.mockito.internal.handler.InvocationNotifierHandler.handle(InvocationNotifierHandler.java:38) at org.mockito.internal.creation.MethodInterceptorFilter.intercept(MethodInterceptorFilter.java:51) at org.apache.storm.blobstore.LocalFsBlobStore$$EnhancerByMockitoWithCGLIB$$bb9ed11f.deleteBlob(<generated>) at org.apache.storm.blobstore.BlobStoreTest.testDeleteAfterFailedCreate(BlobStoreTest.java:181)
Attachments
Issue Links
- links to