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
8d7d044b
Commit
8d7d044b
authored
Aug 29, 2017
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #10084 from pvorb:fix-incomplete-assertions
* pr/10084: Identify and fix incomplete assertions
parents
83eee7e6
04ca7f13
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
10 deletions
+8
-10
RedisHealthIndicatorTests.java
...mework/boot/actuate/health/RedisHealthIndicatorTests.java
+2
-2
SolrHealthIndicatorTests.java
...amework/boot/actuate/health/SolrHealthIndicatorTests.java
+2
-2
NoSuchBeanDefinitionFailureAnalyzerTests.java
...cs/analyzer/NoSuchBeanDefinitionFailureAnalyzerTests.java
+1
-3
DatabaseDriverClassNameTests.java
...ringframework/boot/jdbc/DatabaseDriverClassNameTests.java
+3
-3
No files found.
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/RedisHealthIndicatorTests.java
View file @
8d7d044b
...
...
@@ -100,8 +100,8 @@ public class RedisHealthIndicatorTests {
redisConnectionFactory
);
Health
health
=
healthIndicator
.
health
();
assertThat
(
health
.
getStatus
()).
isEqualTo
(
Status
.
DOWN
);
assertThat
((
(
String
)
health
.
getDetails
().
get
(
"error"
))
.
contains
(
"Connection failed"
)
)
;
assertThat
((
String
)
health
.
getDetails
().
get
(
"error"
))
.
contains
(
"Connection failed"
);
verify
(
redisConnectionFactory
).
getConnection
();
verify
(
redisConnection
).
info
();
}
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/SolrHealthIndicatorTests.java
View file @
8d7d044b
...
...
@@ -94,8 +94,8 @@ public class SolrHealthIndicatorTests {
SolrHealthIndicator
healthIndicator
=
new
SolrHealthIndicator
(
solrClient
);
Health
health
=
healthIndicator
.
health
();
assertThat
(
health
.
getStatus
()).
isEqualTo
(
Status
.
DOWN
);
assertThat
((
(
String
)
health
.
getDetails
().
get
(
"error"
))
.
contains
(
"Connection failed"
)
)
;
assertThat
((
String
)
health
.
getDetails
().
get
(
"error"
))
.
contains
(
"Connection failed"
);
}
private
NamedList
<
Object
>
mockResponse
(
int
status
)
{
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/diagnostics/analyzer/NoSuchBeanDefinitionFailureAnalyzerTests.java
View file @
8d7d044b
/*
* Copyright 2012-201
6
the original author or authors.
* Copyright 2012-201
7
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -166,8 +166,6 @@ public class NoSuchBeanDefinitionFailureAnalyzerTests {
assertThat
(
analysis
.
getDescription
()).
startsWith
(
String
.
format
(
"Constructor in %s required a bean named '%s' that could not be found"
,
StringNameHandler
.
class
.
getName
(),
"test-string"
));
assertThat
(
analysis
.
getDescription
().
contains
(
"No matching auto-configuration has been found for this bean name."
));
assertThat
(
analysis
.
getAction
()).
startsWith
(
String
.
format
(
"Consider defining a bean named '%s' in your configuration."
,
"test-string"
));
...
...
spring-boot/src/test/java/org/springframework/boot/jdbc/DatabaseDriverClassNameTests.java
View file @
8d7d044b
/*
* Copyright 2012-201
6
the original author or authors.
* Copyright 2012-201
7
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -75,8 +75,8 @@ public class DatabaseDriverClassNameTests {
@Test
public
void
databaseClassIsOfRequiredType
()
throws
Exception
{
assertThat
(
getInterfaceNames
(
this
.
className
.
replace
(
'.'
,
'/'
))
.
contains
(
this
.
requiredType
.
getName
().
replace
(
'.'
,
'/'
))
)
;
assertThat
(
getInterfaceNames
(
this
.
className
.
replace
(
'.'
,
'/'
))
)
.
contains
(
this
.
requiredType
.
getName
().
replace
(
'.'
,
'/'
));
}
private
List
<
String
>
getInterfaceNames
(
String
className
)
throws
IOException
{
...
...
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