Upgrade to JUnit 5.5, Mockito 2.28.2

* Fix `LongRunningTest` to rely on the `@EnabledIf` from Spring Test
Framework instead of deprecated now in JUnit 5
* Remove unnecessary stubbing in the `FileReadingMessageSourceTest`
This commit is contained in:
Artem Bilan
2019-07-01 17:04:00 -04:00
parent fb47f447ec
commit 09c4f03d7c
3 changed files with 22 additions and 26 deletions

View File

@@ -21,7 +21,7 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.junit.jupiter.api.condition.EnabledIf;
import org.springframework.test.context.junit.jupiter.EnabledIf;
/**
* JUnit Jupiter condition to prevent long running tests from running on every build;
@@ -33,11 +33,7 @@ import org.junit.jupiter.api.condition.EnabledIf;
*/
@Target({ ElementType.TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@EnabledIf(LongRunningTest.LONG_RUNNING_SCRIPT)
@EnabledIf("#{environment['RUN_LONG_INTEGRATION_TESTS'] == 'true'}")
public @interface LongRunningTest {
String LONG_RUNNING_SCRIPT =
"systemEnvironment.get('RUN_LONG_INTEGRATION_TESTS') == 'true' ||" +
" systemProperty.get('RUN_LONG_INTEGRATION_TESTS') == 'true'";
}