Skip to content

Commit 0454088

Browse files
committed
Widen timeout and delay to accommodate Windows' imprecision under load
Closes gh-23093
1 parent eba2bc3 commit 0454088

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2019 the original author or authors.
2+
* Copyright 2012-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -72,9 +72,9 @@ void longHealth() {
7272
void timeoutReachedUsesFallback() {
7373
Map<String, ReactiveHealthIndicator> indicators = new HashMap<>();
7474
indicators.put("slow", new TimeoutHealth(10000, Status.UP));
75-
indicators.put("fast", new TimeoutHealth(10, Status.UP));
75+
indicators.put("fast", new TimeoutHealth(250, Status.UP));
7676
CompositeReactiveHealthIndicator indicator = new CompositeReactiveHealthIndicator(this.healthAggregator,
77-
new DefaultReactiveHealthIndicatorRegistry(indicators)).timeoutStrategy(100, UNKNOWN_HEALTH);
77+
new DefaultReactiveHealthIndicatorRegistry(indicators)).timeoutStrategy(1000, UNKNOWN_HEALTH);
7878
StepVerifier.create(indicator.health()).consumeNextWith((h) -> {
7979
assertThat(h.getStatus()).isEqualTo(Status.UP);
8080
assertThat(h.getDetails()).containsOnlyKeys("slow", "fast");

0 commit comments

Comments
 (0)