Merge pull request #882 from Alfresco/feature/ACS-6168_intermittent_test_failures_in_http_load_tests

ACS-6168: Add additional check after temp folder creation attempt, to avoid concurrency clashes
This commit is contained in:
Marcin Strankowski 2023-10-27 10:28:54 +02:00 committed by GitHub
commit 2ff3fc63e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -230,7 +230,7 @@ public class FileManager
final File systemTempDir = new File(systemTempDirPath);
final File tempDir = new File(systemTempDir, dirName);
if (!tempDir.exists() && !tempDir.mkdirs())
if (!tempDir.exists() && !tempDir.mkdirs() && !tempDir.exists())
{
throw new RuntimeException("Failed to create temp directory: " + tempDir);
}