diff options
author | Dejan Milisavljevic <dejan.milisavljevic@sonarsource.com> | 2024-04-04 14:48:52 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2024-04-04 20:03:04 +0000 |
commit | 0b20d1aceacf1b9786584e37c2ecb95ce004011c (patch) | |
tree | d8e3c567fbb3bb8ea9d09df10d13c9d9277c2202 /sonar-scanner-engine | |
parent | 2747759566a3c8e75383a55539a2e499730cea5e (diff) | |
download | sonarqube-0b20d1aceacf1b9786584e37c2ecb95ce004011c.tar.gz sonarqube-0b20d1aceacf1b9786584e37c2ecb95ce004011c.zip |
SGB-11 Do not cleanup tempdir
Diffstat (limited to 'sonar-scanner-engine')
-rw-r--r-- | sonar-scanner-engine/src/test/java/org/sonar/scm/git/CompositeBlameCommandIT.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scm/git/CompositeBlameCommandIT.java b/sonar-scanner-engine/src/test/java/org/sonar/scm/git/CompositeBlameCommandIT.java index d1332243431..419a205fd52 100644 --- a/sonar-scanner-engine/src/test/java/org/sonar/scm/git/CompositeBlameCommandIT.java +++ b/sonar-scanner-engine/src/test/java/org/sonar/scm/git/CompositeBlameCommandIT.java @@ -34,6 +34,7 @@ import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.stream.Collectors; import java.util.stream.Stream; +import org.junit.jupiter.api.io.CleanupMode; import org.junit.jupiter.api.io.TempDir; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; @@ -49,6 +50,7 @@ import org.sonar.api.utils.System2; import org.sonar.scm.git.strategy.DefaultBlameStrategy.BlameAlgorithmEnum; import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.jupiter.api.io.CleanupMode.NEVER; import static org.junit.jupiter.params.provider.Arguments.arguments; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @@ -63,7 +65,9 @@ class CompositeBlameCommandIT { private final ProcessWrapperFactory processWrapperFactory = new ProcessWrapperFactory(); private final NativeGitBlameCommand nativeGitBlameCommand = new NativeGitBlameCommand(System2.INSTANCE, processWrapperFactory); - @TempDir + // In JUnit4, if the cleanup cannot be performed, the test would not fail. This has changed with JUnit5 + // As we cannot find the cause of failure during cleanup, we disable it for now + @TempDir (cleanup = NEVER) private File temp; @ParameterizedTest |