mirror of
https://github.com/spring-cloud/spring-cloud-netflix.git
synced 2026-09-17 07:43:44 +00:00
Bumping versions
This commit is contained in:
+4
-6
@@ -28,7 +28,6 @@ import static org.assertj.core.api.Assertions.assertThatCode;
|
||||
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
|
||||
/**
|
||||
* @author Mohamed Macow
|
||||
*/
|
||||
@@ -45,8 +44,7 @@ class EurekaDiscoveryClientTests {
|
||||
void shouldCompleteProbeWhenClientHealthy() {
|
||||
when(eurekaClient.getApplications()).thenReturn(new Applications());
|
||||
|
||||
assertThatCode(() -> client.probe())
|
||||
.doesNotThrowAnyException();
|
||||
assertThatCode(() -> client.probe()).doesNotThrowAnyException();
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -54,8 +52,8 @@ class EurekaDiscoveryClientTests {
|
||||
RuntimeException eurekaException = new RuntimeException("exception");
|
||||
when(eurekaClient.getApplications()).thenThrow(eurekaException);
|
||||
|
||||
assertThatExceptionOfType(eurekaException.getClass())
|
||||
.isThrownBy(() -> client.probe())
|
||||
.withMessage(eurekaException.getMessage());
|
||||
assertThatExceptionOfType(eurekaException.getClass()).isThrownBy(() -> client.probe())
|
||||
.withMessage(eurekaException.getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+3
-6
@@ -114,8 +114,7 @@ class EurekaReactiveDiscoveryClientTests {
|
||||
void shouldCompleteReactiveProbeWhenClientHealthy() {
|
||||
when(eurekaClient.getApplications()).thenReturn(new Applications());
|
||||
|
||||
StepVerifier.create(client.reactiveProbe())
|
||||
.verifyComplete();
|
||||
StepVerifier.create(client.reactiveProbe()).verifyComplete();
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -124,10 +123,8 @@ class EurekaReactiveDiscoveryClientTests {
|
||||
when(eurekaClient.getApplications()).thenThrow(eurekaException);
|
||||
|
||||
StepVerifier.create(client.reactiveProbe())
|
||||
.verifyErrorSatisfies(ex ->
|
||||
assertThat(ex)
|
||||
.isInstanceOf(RuntimeException.class)
|
||||
.hasMessage(eurekaException.getMessage()));
|
||||
.verifyErrorSatisfies(
|
||||
ex -> assertThat(ex).isInstanceOf(RuntimeException.class).hasMessage(eurekaException.getMessage()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user