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
04d6b21d
Commit
04d6b21d
authored
Jan 17, 2020
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sort test failures before logging them
See gh-19696
parent
736963e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
TestFailuresPlugin.java
...pringframework/boot/build/testing/TestFailuresPlugin.java
+4
-5
No files found.
buildSrc/src/main/java/org/springframework/boot/build/testing/TestFailuresPlugin.java
View file @
04d6b21d
...
...
@@ -17,6 +17,7 @@
package
org
.
springframework
.
boot
.
build
.
testing
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.TreeMap
;
...
...
@@ -69,6 +70,7 @@ public class TestFailuresPlugin implements Plugin<Project> {
@Override
public
void
afterSuite
(
TestDescriptor
descriptor
,
TestResult
result
)
{
if
(!
this
.
failures
.
isEmpty
())
{
Collections
.
sort
(
this
.
failures
);
this
.
testResults
.
addFailures
(
this
.
test
,
this
.
failures
);
}
}
...
...
@@ -76,7 +78,7 @@ public class TestFailuresPlugin implements Plugin<Project> {
@Override
public
void
afterTest
(
TestDescriptor
descriptor
,
TestResult
result
)
{
if
(
result
.
getFailedTestCount
()
>
0
)
{
this
.
failures
.
add
(
new
TestFailure
(
descriptor
,
result
.
getExceptions
()
));
this
.
failures
.
add
(
new
TestFailure
(
descriptor
));
}
}
...
...
@@ -96,11 +98,8 @@ public class TestFailuresPlugin implements Plugin<Project> {
private
final
TestDescriptor
descriptor
;
private
final
List
<
Throwable
>
exceptions
;
private
TestFailure
(
TestDescriptor
descriptor
,
List
<
Throwable
>
exceptions
)
{
private
TestFailure
(
TestDescriptor
descriptor
)
{
this
.
descriptor
=
descriptor
;
this
.
exceptions
=
exceptions
;
}
@Override
...
...
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