Skip to content

Commit 96f67d5

Browse files
committed
Disable Mockito tests on previous versions
This commit ignores Mockito tests that run with Mockito 1 and earlier version of Mockito 2. Java9 support seems to be only available as of Mockito 2.5+ See also gh-9530
1 parent 9d77720 commit 96f67d5

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/Mockito110Tests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
package org.springframework.boot.test.mock.mockito;
1818

19+
import org.junit.Ignore;
1920
import org.junit.Test;
2021
import org.junit.runner.JUnitCore;
2122
import org.junit.runner.Result;
@@ -35,6 +36,7 @@
3536
*/
3637
@RunWith(ModifiedClassPathRunner.class)
3738
@ClassPathOverrides("org.mockito:mockito-core:1.10.19")
39+
@Ignore("Mockito 2.5+ is required with Java 9")
3840
public class Mockito110Tests {
3941

4042
@Test

spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/Mockito21Tests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
package org.springframework.boot.test.mock.mockito;
1818

19+
import org.junit.Ignore;
1920
import org.junit.Test;
2021
import org.junit.runner.JUnitCore;
2122
import org.junit.runner.Result;
@@ -34,6 +35,7 @@
3435
*/
3536
@RunWith(ModifiedClassPathRunner.class)
3637
@ClassPathOverrides("org.mockito:mockito-core:2.1.0")
38+
@Ignore("Mockito 2.5+ is required with Java 9")
3739
public class Mockito21Tests {
3840

3941
@Test

spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/Mockito22Tests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
package org.springframework.boot.test.mock.mockito;
1818

19+
import org.junit.Ignore;
1920
import org.junit.Test;
2021
import org.junit.runner.JUnitCore;
2122
import org.junit.runner.Result;
@@ -34,6 +35,7 @@
3435
*/
3536
@RunWith(ModifiedClassPathRunner.class)
3637
@ClassPathOverrides("org.mockito:mockito-core:2.2.0")
38+
@Ignore("Mockito 2.5+ is required with Java 9")
3739
public class Mockito22Tests {
3840

3941
@Test

0 commit comments

Comments
 (0)