Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
ac0bb2b7
Commit
ac0bb2b7
authored
Jan 26, 2020
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #19907 from dreis2211
* pr/19907: Upgrade to JUnit Jupiter 5.6.0 Closes gh-19907
parents
32cb4c14
d75de394
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
22 deletions
+10
-22
build.gradle
buildSrc/build.gradle
+1
-1
TestFailuresPluginIntegrationTests.java
...oot/build/testing/TestFailuresPluginIntegrationTests.java
+1
-1
build.gradle
spring-boot-project/spring-boot-dependencies/build.gradle
+1
-1
RunningDocumentationTests.java
...framework/boot/gradle/docs/RunningDocumentationTests.java
+2
-2
SpringBootPluginIntegrationTests.java
.../boot/gradle/plugin/SpringBootPluginIntegrationTests.java
+3
-3
ModifiedClassPathExtension.java
...oot/testsupport/classpath/ModifiedClassPathExtension.java
+2
-14
No files found.
buildSrc/build.gradle
View file @
ac0bb2b7
...
@@ -25,7 +25,7 @@ dependencies {
...
@@ -25,7 +25,7 @@ dependencies {
implementation
(
"io.spring.javaformat:spring-javaformat-gradle-plugin:${javaFormatVersion}"
)
implementation
(
"io.spring.javaformat:spring-javaformat-gradle-plugin:${javaFormatVersion}"
)
testImplementation
(
"org.assertj:assertj-core:3.11.1"
)
testImplementation
(
"org.assertj:assertj-core:3.11.1"
)
testImplementation
(
"org.apache.logging.log4j:log4j-core:2.12.1"
)
testImplementation
(
"org.apache.logging.log4j:log4j-core:2.12.1"
)
testImplementation
(
"org.junit.jupiter:junit-jupiter:5.
5.2
"
)
testImplementation
(
"org.junit.jupiter:junit-jupiter:5.
6.0
"
)
}
}
checkstyle
{
checkstyle
{
...
...
buildSrc/src/test/java/org/springframework/boot/build/testing/TestFailuresPluginIntegrationTests.java
View file @
ac0bb2b7
...
@@ -149,7 +149,7 @@ class TestFailuresPluginIntegrationTests {
...
@@ -149,7 +149,7 @@ class TestFailuresPluginIntegrationTests {
writer
.
println
(
"}"
);
writer
.
println
(
"}"
);
writer
.
println
();
writer
.
println
();
writer
.
println
(
"dependencies {"
);
writer
.
println
(
"dependencies {"
);
writer
.
println
(
" testImplementation 'org.junit.jupiter:junit-jupiter:5.
5.2
'"
);
writer
.
println
(
" testImplementation 'org.junit.jupiter:junit-jupiter:5.
6.0
'"
);
writer
.
println
(
" testImplementation 'org.assertj:assertj-core:3.11.1'"
);
writer
.
println
(
" testImplementation 'org.assertj:assertj-core:3.11.1'"
);
writer
.
println
(
"}"
);
writer
.
println
(
"}"
);
writer
.
println
();
writer
.
println
();
...
...
spring-boot-project/spring-boot-dependencies/build.gradle
View file @
ac0bb2b7
...
@@ -942,7 +942,7 @@ bom {
...
@@ -942,7 +942,7 @@ bom {
]
]
}
}
}
}
library
(
"JUnit Jupiter"
,
"5.
5.2
"
)
{
library
(
"JUnit Jupiter"
,
"5.
6.0
"
)
{
group
(
"org.junit"
)
{
group
(
"org.junit"
)
{
imports
=
[
imports
=
[
"junit-bom"
"junit-bom"
...
...
spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/docs/RunningDocumentationTests.java
View file @
ac0bb2b7
...
@@ -20,7 +20,7 @@ import java.io.File;
...
@@ -20,7 +20,7 @@ import java.io.File;
import
java.io.IOException
;
import
java.io.IOException
;
import
org.junit.jupiter.api.TestTemplate
;
import
org.junit.jupiter.api.TestTemplate
;
import
org.junit.jupiter.api.condition.Disabled
OnJr
e
;
import
org.junit.jupiter.api.condition.Disabled
ForJreRang
e
;
import
org.junit.jupiter.api.condition.JRE
;
import
org.junit.jupiter.api.condition.JRE
;
import
org.junit.jupiter.api.extension.ExtendWith
;
import
org.junit.jupiter.api.extension.ExtendWith
;
...
@@ -41,7 +41,7 @@ class RunningDocumentationTests {
...
@@ -41,7 +41,7 @@ class RunningDocumentationTests {
GradleBuild
gradleBuild
;
GradleBuild
gradleBuild
;
@TestTemplate
@TestTemplate
@Disabled
OnJre
(
JRE
.
JAVA_13
)
@Disabled
ForJreRange
(
min
=
JRE
.
JAVA_13
)
void
bootRunMain
()
throws
IOException
{
void
bootRunMain
()
throws
IOException
{
// Testing of convention mappings is flakey between 5.2 and 6.0 inclusive
// Testing of convention mappings is flakey between 5.2 and 6.0 inclusive
// https://github.com/gradle/gradle/issues/11323
// https://github.com/gradle/gradle/issues/11323
...
...
spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/plugin/SpringBootPluginIntegrationTests.java
View file @
ac0bb2b7
...
@@ -21,7 +21,7 @@ import java.io.IOException;
...
@@ -21,7 +21,7 @@ import java.io.IOException;
import
org.gradle.testkit.runner.BuildResult
;
import
org.gradle.testkit.runner.BuildResult
;
import
org.junit.jupiter.api.Test
;
import
org.junit.jupiter.api.Test
;
import
org.junit.jupiter.api.condition.Disabled
OnJr
e
;
import
org.junit.jupiter.api.condition.Disabled
ForJreRang
e
;
import
org.junit.jupiter.api.condition.JRE
;
import
org.junit.jupiter.api.condition.JRE
;
import
org.junit.jupiter.api.extension.ExtendWith
;
import
org.junit.jupiter.api.extension.ExtendWith
;
...
@@ -47,13 +47,13 @@ class SpringBootPluginIntegrationTests {
...
@@ -47,13 +47,13 @@ class SpringBootPluginIntegrationTests {
.
contains
(
"Spring Boot plugin requires Gradle 5.6 or later. The current version is Gradle 5.5.1"
);
.
contains
(
"Spring Boot plugin requires Gradle 5.6 or later. The current version is Gradle 5.5.1"
);
}
}
@Disabled
OnJre
(
JRE
.
JAVA_13
)
@Disabled
ForJreRange
(
min
=
JRE
.
JAVA_13
)
@Test
@Test
void
succeedWithVersionOfGradleHigherThanRequired
()
{
void
succeedWithVersionOfGradleHigherThanRequired
()
{
this
.
gradleBuild
.
gradleVersion
(
"5.6.1"
).
build
();
this
.
gradleBuild
.
gradleVersion
(
"5.6.1"
).
build
();
}
}
@Disabled
OnJre
(
JRE
.
JAVA_13
)
@Disabled
ForJreRange
(
min
=
JRE
.
JAVA_13
)
@Test
@Test
void
succeedWithVersionOfGradleMatchingWhatIsRequired
()
{
void
succeedWithVersionOfGradleMatchingWhatIsRequired
()
{
this
.
gradleBuild
.
gradleVersion
(
"5.6"
).
build
();
this
.
gradleBuild
.
gradleVersion
(
"5.6"
).
build
();
...
...
spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/classpath/ModifiedClassPathExtension.java
View file @
ac0bb2b7
...
@@ -16,10 +16,8 @@
...
@@ -16,10 +16,8 @@
package
org
.
springframework
.
boot
.
testsupport
.
classpath
;
package
org
.
springframework
.
boot
.
testsupport
.
classpath
;
import
java.lang.reflect.Field
;
import
java.lang.reflect.Method
;
import
java.lang.reflect.Method
;
import
java.net.URLClassLoader
;
import
java.net.URLClassLoader
;
import
java.util.concurrent.atomic.AtomicBoolean
;
import
org.junit.jupiter.api.extension.Extension
;
import
org.junit.jupiter.api.extension.Extension
;
import
org.junit.jupiter.api.extension.ExtensionContext
;
import
org.junit.jupiter.api.extension.ExtensionContext
;
...
@@ -76,7 +74,7 @@ class ModifiedClassPathExtension implements InvocationInterceptor {
...
@@ -76,7 +74,7 @@ class ModifiedClassPathExtension implements InvocationInterceptor {
invocation
.
proceed
();
invocation
.
proceed
();
return
;
return
;
}
}
fakeInvocation
(
invocation
);
invocation
.
skip
(
);
runTestWithModifiedClassPath
(
invocationContext
,
extensionContext
);
runTestWithModifiedClassPath
(
invocationContext
,
extensionContext
);
}
}
...
@@ -129,17 +127,7 @@ class ModifiedClassPathExtension implements InvocationInterceptor {
...
@@ -129,17 +127,7 @@ class ModifiedClassPathExtension implements InvocationInterceptor {
invocation
.
proceed
();
invocation
.
proceed
();
return
;
return
;
}
}
fakeInvocation
(
invocation
);
invocation
.
skip
();
}
private
void
fakeInvocation
(
Invocation
<
Void
>
invocation
)
{
try
{
Field
field
=
ReflectionUtils
.
findField
(
invocation
.
getClass
(),
"invoked"
);
ReflectionUtils
.
makeAccessible
(
field
);
ReflectionUtils
.
setField
(
field
,
invocation
,
new
AtomicBoolean
(
true
));
}
catch
(
Throwable
ex
)
{
}
}
}
private
boolean
isModifiedClassPathClassLoader
(
ExtensionContext
extensionContext
)
{
private
boolean
isModifiedClassPathClassLoader
(
ExtensionContext
extensionContext
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment