From 04540887af1dcf4c38794d08a556b57efbf4057f Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 26 Aug 2020 14:47:07 +0100 Subject: [PATCH] Widen timeout and delay to accommodate Windows' imprecision under load Closes gh-23093 --- .../health/CompositeReactiveHealthIndicatorTests.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/CompositeReactiveHealthIndicatorTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/CompositeReactiveHealthIndicatorTests.java index f8818b560f2..b5793166850 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/CompositeReactiveHealthIndicatorTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/CompositeReactiveHealthIndicatorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -72,9 +72,9 @@ class CompositeReactiveHealthIndicatorTests { void timeoutReachedUsesFallback() { Map indicators = new HashMap<>(); indicators.put("slow", new TimeoutHealth(10000, Status.UP)); - indicators.put("fast", new TimeoutHealth(10, Status.UP)); + indicators.put("fast", new TimeoutHealth(250, Status.UP)); CompositeReactiveHealthIndicator indicator = new CompositeReactiveHealthIndicator(this.healthAggregator, - new DefaultReactiveHealthIndicatorRegistry(indicators)).timeoutStrategy(100, UNKNOWN_HEALTH); + new DefaultReactiveHealthIndicatorRegistry(indicators)).timeoutStrategy(1000, UNKNOWN_HEALTH); StepVerifier.create(indicator.health()).consumeNextWith((h) -> { assertThat(h.getStatus()).isEqualTo(Status.UP); assertThat(h.getDetails()).containsOnlyKeys("slow", "fast");