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
f670615b
Commit
f670615b
authored
Jan 23, 2020
by
Johnny Lim
Committed by
Andy Wilkinson
Jan 23, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix TestFailuresPlugin.TestFailure.compareTo()
This commit also polishes around it a bit. See gh-19863
parent
1d396abe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
9 deletions
+4
-9
TestFailuresPlugin.java
...pringframework/boot/build/testing/TestFailuresPlugin.java
+2
-2
TestFailuresPluginIntegrationTests.java
...oot/build/testing/TestFailuresPluginIntegrationTests.java
+2
-7
No files found.
buildSrc/src/main/java/org/springframework/boot/build/testing/TestFailuresPlugin.java
View file @
f670615b
...
@@ -56,7 +56,7 @@ public class TestFailuresPlugin implements Plugin<Project> {
...
@@ -56,7 +56,7 @@ public class TestFailuresPlugin implements Plugin<Project> {
private
final
class
FailureRecordingTestListener
implements
TestListener
{
private
final
class
FailureRecordingTestListener
implements
TestListener
{
private
List
<
TestFailure
>
failures
=
new
ArrayList
<>();
private
final
List
<
TestFailure
>
failures
=
new
ArrayList
<>();
private
final
TestResultsExtension
testResults
;
private
final
TestResultsExtension
testResults
;
...
@@ -106,7 +106,7 @@ public class TestFailuresPlugin implements Plugin<Project> {
...
@@ -106,7 +106,7 @@ public class TestFailuresPlugin implements Plugin<Project> {
public
int
compareTo
(
TestFailure
other
)
{
public
int
compareTo
(
TestFailure
other
)
{
int
comparison
=
this
.
descriptor
.
getClassName
().
compareTo
(
other
.
descriptor
.
getClassName
());
int
comparison
=
this
.
descriptor
.
getClassName
().
compareTo
(
other
.
descriptor
.
getClassName
());
if
(
comparison
==
0
)
{
if
(
comparison
==
0
)
{
comparison
=
this
.
descriptor
.
getName
().
compareTo
(
other
.
descriptor
.
get
Class
Name
());
comparison
=
this
.
descriptor
.
getName
().
compareTo
(
other
.
descriptor
.
getName
());
}
}
return
comparison
;
return
comparison
;
}
}
...
...
buildSrc/src/test/java/org/springframework/boot/build/testing/TestFailuresPluginIntegrationTests.java
View file @
f670615b
...
@@ -22,9 +22,9 @@ import java.io.FileWriter;
...
@@ -22,9 +22,9 @@ import java.io.FileWriter;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.io.PrintWriter
;
import
java.io.PrintWriter
;
import
java.io.StringReader
;
import
java.io.StringReader
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.function.Consumer
;
import
java.util.function.Consumer
;
import
java.util.stream.Collectors
;
import
org.gradle.testkit.runner.BuildResult
;
import
org.gradle.testkit.runner.BuildResult
;
import
org.gradle.testkit.runner.GradleRunner
;
import
org.gradle.testkit.runner.GradleRunner
;
...
@@ -169,17 +169,12 @@ class TestFailuresPluginIntegrationTests {
...
@@ -169,17 +169,12 @@ class TestFailuresPluginIntegrationTests {
}
}
private
List
<
String
>
readLines
(
String
output
)
{
private
List
<
String
>
readLines
(
String
output
)
{
List
<
String
>
lines
=
new
ArrayList
<>();
try
(
BufferedReader
reader
=
new
BufferedReader
(
new
StringReader
(
output
)))
{
try
(
BufferedReader
reader
=
new
BufferedReader
(
new
StringReader
(
output
)))
{
String
line
;
return
reader
.
lines
().
collect
(
Collectors
.
toList
());
while
((
line
=
reader
.
readLine
())
!=
null
)
{
lines
.
add
(
line
);
}
}
}
catch
(
IOException
ex
)
{
catch
(
IOException
ex
)
{
throw
new
RuntimeException
(
ex
);
throw
new
RuntimeException
(
ex
);
}
}
return
lines
;
}
}
}
}
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