Skip to content

Fix Eureka health indicator when registry fetch fails#4564

Open
pony-maggie wants to merge 1 commit into
spring-cloud:mainfrom
pony-maggie:fix-eureka-health-indicator-down
Open

Fix Eureka health indicator when registry fetch fails#4564
pony-maggie wants to merge 1 commit into
spring-cloud:mainfrom
pony-maggie:fix-eureka-health-indicator-down

Conversation

@pony-maggie
Copy link
Copy Markdown

What changed

Updated the Eureka health indicator so registry fetch failures report DOWN instead of UP when the client has never successfully fetched the registry or the last successful fetch is stale.

Added regression tests for both cases.

Why

A Eureka client that cannot connect to a Eureka server should not report the Eureka health component as UP. This fixes the behavior reported in gh-4562.

How tested

  • JAVA_HOME=$(/usr/libexec/java_home -v 17) ./mvnw -pl spring-cloud-netflix-eureka-client -Dtest=EurekaHealthIndicatorTests test -P spring -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn --batch-mode
  • JAVA_HOME=$(/usr/libexec/java_home -v 17) ./mvnw -pl spring-cloud-netflix-eureka-client test -P spring -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn --batch-mode

Fixes gh-4562

Fixes spring-cloudgh-4562

Signed-off-by: Lucas Ma <7184042+pony-maggie@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Health indicator for Eureka client reports UP when not connected to server

2 participants