mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-29 21:59:02 +00:00
Merge pull request #19094 from dreis2211
* gh-19094: Fix StepVerifier usage in HealthIndicatorReactiveAdapterTests Closes gh-19094
This commit is contained in:
+3
-1
@@ -16,6 +16,8 @@
|
||||
|
||||
package org.springframework.boot.actuate.health;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import reactor.test.StepVerifier;
|
||||
|
||||
@@ -44,7 +46,7 @@ class HealthIndicatorReactiveAdapterTests {
|
||||
HealthIndicator delegate = mock(HealthIndicator.class);
|
||||
HealthIndicatorReactiveAdapter adapter = new HealthIndicatorReactiveAdapter(delegate);
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user