Calling PreviousVersionManager.prepareBucketFsFile() with an invalid URL fails with a misleading exception about a missing file:
Caused by: java.io.UncheckedIOException: E-EMIT-34: Error deleting file '/var/folders/lf/jgd3vk7x3p13y01zh2rdxh5wdt5xmg/T/adapter-13185178563712265507.tmp'
at com.exasol.extensionmanager.itest.PreviousVersionManager.deleteFile(PreviousVersionManager.java:146)
at com.exasol.extensionmanager.itest.PreviousVersionManager.prepareBucketFsFile(PreviousVersionManager.java:63)
at com.exasol.extensionmanager.itest.PreviousVersionManagerTest.lambda$4(PreviousVersionManagerTest.java:99)
at org.junit.jupiter.api.AssertThrows.assertThrows(AssertThrows.java:53)
... 6 more
Caused by: java.nio.file.NoSuchFileException: /var/folders/lf/jgd3vk7x3p13y01zh2rdxh5wdt5xmg/T/adapter-13185178563712265507.tmp
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
at java.base/sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:249)
at java.base/sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:105)
at java.base/java.nio.file.Files.delete(Files.java:1142)
at com.exasol.extensionmanager.itest.PreviousVersionManager.deleteFile(PreviousVersionManager.java:144)
... 9 more
Root cause: file cleanup logic in finally block tries to delete the non-existing file, hiding the helpful IllegalStateException with message E-EMIT-39: Download of 'https://extensions-internal.exasol.com/missing-file' failed with non-OK status 404.
Calling
PreviousVersionManager.prepareBucketFsFile()
with an invalid URL fails with a misleading exception about a missing file:Root cause: file cleanup logic in
finally
block tries to delete the non-existing file, hiding the helpfulIllegalStateException
with messageE-EMIT-39: Download of 'https://extensions-internal.exasol.com/missing-file' failed with non-OK status 404
.