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
f4c8668a
Commit
f4c8668a
authored
Sep 01, 2020
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.3.x'
Closes gh-23157
parents
2e4b3387
652561c2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
Hazelcast4HazelcastHealthIndicatorTests.java
...te/hazelcast/Hazelcast4HazelcastHealthIndicatorTests.java
+2
-2
HazelcastHealthIndicatorTests.java
...boot/actuate/hazelcast/HazelcastHealthIndicatorTests.java
+2
-2
checkstyle.xml
src/checkstyle/checkstyle.xml
+2
-2
No files found.
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/hazelcast/Hazelcast4HazelcastHealthIndicatorTests.java
View file @
f4c8668a
...
...
@@ -31,7 +31,7 @@ import org.springframework.core.io.ClassPathResource;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
import
static
org
.
mockito
.
ArgumentMatchers
.
any
;
import
static
org
.
mockito
.
BDDMockito
.
wh
en
;
import
static
org
.
mockito
.
BDDMockito
.
giv
en
;
import
static
org
.
mockito
.
Mockito
.
mock
;
/**
...
...
@@ -63,7 +63,7 @@ class Hazelcast4HazelcastHealthIndicatorTests {
@Test
void
hazelcastDown
()
{
HazelcastInstance
hazelcast
=
mock
(
HazelcastInstance
.
class
);
when
(
hazelcast
.
executeTransaction
(
any
())).
then
Throw
(
new
HazelcastException
());
given
(
hazelcast
.
executeTransaction
(
any
())).
will
Throw
(
new
HazelcastException
());
Health
health
=
new
HazelcastHealthIndicator
(
hazelcast
).
health
();
assertThat
(
health
.
getStatus
()).
isEqualTo
(
Status
.
DOWN
);
}
...
...
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/hazelcast/HazelcastHealthIndicatorTests.java
View file @
f4c8668a
...
...
@@ -29,7 +29,7 @@ import org.springframework.core.io.ClassPathResource;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
import
static
org
.
mockito
.
ArgumentMatchers
.
any
;
import
static
org
.
mockito
.
BDDMockito
.
wh
en
;
import
static
org
.
mockito
.
BDDMockito
.
giv
en
;
import
static
org
.
mockito
.
Mockito
.
mock
;
/**
...
...
@@ -59,7 +59,7 @@ class HazelcastHealthIndicatorTests {
@Test
void
hazelcastDown
()
{
HazelcastInstance
hazelcast
=
mock
(
HazelcastInstance
.
class
);
when
(
hazelcast
.
executeTransaction
(
any
())).
then
Throw
(
new
HazelcastException
());
given
(
hazelcast
.
executeTransaction
(
any
())).
will
Throw
(
new
HazelcastException
());
Health
health
=
new
HazelcastHealthIndicator
(
hazelcast
).
health
();
assertThat
(
health
.
getStatus
()).
isEqualTo
(
Status
.
DOWN
);
}
...
...
src/checkstyle/checkstyle.xml
View file @
f4c8668a
...
...
@@ -41,9 +41,9 @@
</module>
<module
name=
"com.puppycrawl.tools.checkstyle.checks.regexp.RegexpSinglelineJavaCheck"
>
<property
name=
"maximum"
value=
"0"
/>
<property
name=
"format"
value=
"org\.mockito\.
Mockito
\.(when|doThrow|doAnswer)"
/>
<property
name=
"format"
value=
"org\.mockito\.
(Mockito|BDDMockito)
\.(when|doThrow|doAnswer)"
/>
<property
name=
"message"
value=
"Please use BDDMockito imports."
/>
value=
"Please use BDD
-style (given, when, then) using BDD
Mockito imports."
/>
<property
name=
"ignoreComments"
value=
"true"
/>
</module>
<module
name=
"io.spring.javaformat.checkstyle.check.SpringJavadocCheck"
>
...
...
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