ARTEMIS-5199 Fixing race on create directory for shared storage

This is fixing SharedStoreDistributionTest
This commit is contained in:
Clebert Suconic 2024-12-04 09:06:56 -05:00 committed by clebertsuconic
parent 8b8d552a0d
commit 29354d4a66
1 changed files with 1 additions and 1 deletions

View File

@ -715,7 +715,7 @@ public class JournalStorageManager extends AbstractJournalStorageManager {
private void checkAndCreateDir(final File dir, final boolean create) {
if (!dir.exists()) {
if (create) {
if (!dir.mkdirs()) {
if (!dir.mkdirs() && !dir.exists()) {
throw new IllegalStateException("Failed to create directory " + dir);
}
} else {