Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-15415

HealthContextService is not respecting MP Health config values which leads to wrong initial responses

    XMLWordPrintable

Details

    Description

      In the fix introduce in WFLY-15281 we correctly returned the expected JSON object with Health DOWN value in https://github.com/wildfly/wildfly/blob/main/health/src/main/java/org/wildfly/extension/health/HealthContextService.java#L133. However, this not correctly processing MP Health config values defined in the specification (mp.health.default.readiness.empty.response and mp.health.default.startup.empty.response) which leads to intermittent failures in tests that set these values to UP. K8s environments would still process 503 responses correctly, however, in our tests we need to assert the correct health response was returned so the correct fix would be to return something that K8s reject and tests don't process as valid response so I suggest to use 404 status code to act as the endpoint was not booted yet which is a case that is actually happening and handled in tests here - https://github.com/wildfly/wildfly/blob/main/testsuite/integration/manualmode/src/test/java/org/wildfly/test/manual/microprofile/health/MicroProfileHealthDefaultEmptyStartupHTTPEndpointTestCase.java#L63.

      Attachments

        Issue Links

          Activity

            People

              mstefank Martin Stefanko
              mstefank Martin Stefanko
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: