Browse Source

Fix StepVerifier usage in HealthIndicatorReactiveAdapterTests

pull/19108/head
dreis2211 6 years ago committed by Brian Clozel
parent
commit
21dc7e9ca3
  1. 4
      spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/HealthIndicatorReactiveAdapterTests.java

4
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/HealthIndicatorReactiveAdapterTests.java

@ -16,6 +16,8 @@
package org.springframework.boot.actuate.health; package org.springframework.boot.actuate.health;
import java.time.Duration;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import reactor.test.StepVerifier; import reactor.test.StepVerifier;
@ -44,7 +46,7 @@ class HealthIndicatorReactiveAdapterTests {
HealthIndicator delegate = mock(HealthIndicator.class); HealthIndicator delegate = mock(HealthIndicator.class);
HealthIndicatorReactiveAdapter adapter = new HealthIndicatorReactiveAdapter(delegate); HealthIndicatorReactiveAdapter adapter = new HealthIndicatorReactiveAdapter(delegate);
given(delegate.health()).willThrow(new IllegalStateException("Expected")); given(delegate.health()).willThrow(new IllegalStateException("Expected"));
StepVerifier.create(adapter.health()).expectError(IllegalStateException.class); StepVerifier.create(adapter.health()).expectError(IllegalStateException.class).verify(Duration.ofSeconds(10));
} }
@Test @Test

Loading…
Cancel
Save