Skip to content

Commit d8afd90

Browse files
committed
Bumping versions
1 parent 9be3229 commit d8afd90

2 files changed

Lines changed: 7 additions & 12 deletions

File tree

spring-cloud-netflix-eureka-client/src/test/java/org/springframework/cloud/netflix/eureka/EurekaDiscoveryClientTests.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
2929
import static org.mockito.Mockito.when;
3030

31-
3231
/**
3332
* @author Mohamed Macow
3433
*/
@@ -45,17 +44,16 @@ class EurekaDiscoveryClientTests {
4544
void shouldCompleteProbeWhenClientHealthy() {
4645
when(eurekaClient.getApplications()).thenReturn(new Applications());
4746

48-
assertThatCode(() -> client.probe())
49-
.doesNotThrowAnyException();
47+
assertThatCode(() -> client.probe()).doesNotThrowAnyException();
5048
}
5149

5250
@Test
5351
void shouldThrowProbeWhenClientThrows() {
5452
RuntimeException eurekaException = new RuntimeException("exception");
5553
when(eurekaClient.getApplications()).thenThrow(eurekaException);
5654

57-
assertThatExceptionOfType(eurekaException.getClass())
58-
.isThrownBy(() -> client.probe())
59-
.withMessage(eurekaException.getMessage());
55+
assertThatExceptionOfType(eurekaException.getClass()).isThrownBy(() -> client.probe())
56+
.withMessage(eurekaException.getMessage());
6057
}
58+
6159
}

spring-cloud-netflix-eureka-client/src/test/java/org/springframework/cloud/netflix/eureka/reactive/EurekaReactiveDiscoveryClientTests.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,7 @@ void shouldReturnFluxOfServiceInstances() {
114114
void shouldCompleteReactiveProbeWhenClientHealthy() {
115115
when(eurekaClient.getApplications()).thenReturn(new Applications());
116116

117-
StepVerifier.create(client.reactiveProbe())
118-
.verifyComplete();
117+
StepVerifier.create(client.reactiveProbe()).verifyComplete();
119118
}
120119

121120
@Test
@@ -124,10 +123,8 @@ void shouldErrorReactiveProbeWhenClientThrows() {
124123
when(eurekaClient.getApplications()).thenThrow(eurekaException);
125124

126125
StepVerifier.create(client.reactiveProbe())
127-
.verifyErrorSatisfies(ex ->
128-
assertThat(ex)
129-
.isInstanceOf(RuntimeException.class)
130-
.hasMessage(eurekaException.getMessage()));
126+
.verifyErrorSatisfies(
127+
ex -> assertThat(ex).isInstanceOf(RuntimeException.class).hasMessage(eurekaException.getMessage()));
131128
}
132129

133130
}

0 commit comments

Comments
 (0)