Merge branch '2.3.x'
Closes gh-23157
This commit is contained in:
@@ -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.when;
|
||||
import static org.mockito.BDDMockito.given;
|
||||
import static org.mockito.Mockito.mock;
|
||||
|
||||
/**
|
||||
@@ -63,7 +63,7 @@ class Hazelcast4HazelcastHealthIndicatorTests {
|
||||
@Test
|
||||
void hazelcastDown() {
|
||||
HazelcastInstance hazelcast = mock(HazelcastInstance.class);
|
||||
when(hazelcast.executeTransaction(any())).thenThrow(new HazelcastException());
|
||||
given(hazelcast.executeTransaction(any())).willThrow(new HazelcastException());
|
||||
Health health = new HazelcastHealthIndicator(hazelcast).health();
|
||||
assertThat(health.getStatus()).isEqualTo(Status.DOWN);
|
||||
}
|
||||
|
||||
@@ -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.when;
|
||||
import static org.mockito.BDDMockito.given;
|
||||
import static org.mockito.Mockito.mock;
|
||||
|
||||
/**
|
||||
@@ -59,7 +59,7 @@ class HazelcastHealthIndicatorTests {
|
||||
@Test
|
||||
void hazelcastDown() {
|
||||
HazelcastInstance hazelcast = mock(HazelcastInstance.class);
|
||||
when(hazelcast.executeTransaction(any())).thenThrow(new HazelcastException());
|
||||
given(hazelcast.executeTransaction(any())).willThrow(new HazelcastException());
|
||||
Health health = new HazelcastHealthIndicator(hazelcast).health();
|
||||
assertThat(health.getStatus()).isEqualTo(Status.DOWN);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user