Skip to content

Commit 6bbc3d1

Browse files
committed
Merge pull request #19094 from dreis2211
* gh-19094: Fix StepVerifier usage in HealthIndicatorReactiveAdapterTests Closes gh-19094
2 parents 24906e6 + 21dc7e9 commit 6bbc3d1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
package org.springframework.boot.actuate.health;
1818

19+
import java.time.Duration;
20+
1921
import org.junit.jupiter.api.Test;
2022
import reactor.test.StepVerifier;
2123

@@ -44,7 +46,7 @@ void delegateThrowError() {
4446
HealthIndicator delegate = mock(HealthIndicator.class);
4547
HealthIndicatorReactiveAdapter adapter = new HealthIndicatorReactiveAdapter(delegate);
4648
given(delegate.health()).willThrow(new IllegalStateException("Expected"));
47-
StepVerifier.create(adapter.health()).expectError(IllegalStateException.class);
49+
StepVerifier.create(adapter.health()).expectError(IllegalStateException.class).verify(Duration.ofSeconds(10));
4850
}
4951

5052
@Test

0 commit comments

Comments
 (0)