You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix intermittent hot-reload test failures caused by metadata initialization race condition (#3302)
## Why make this change?
Related to #2992
Some flakey tests were being masked by faster initialization when the
task they were in was isolated. When we refactored the tests to lower
the overall runtime in this PR
#3245 these flakey tests
were eventually revealed.
The root cause was a race condition: after a successful hot-reload,
`WaitForConditionAsync` detects the "Validated hot-reloaded
configuration file" console message and returns, but the engine's
metadata providers have not fully re-initialized yet. An immediate HTTP
request can arrive before the metadata is ready, causing a 500 error.
## What is this change?
Added retry logic to the three non-ignored tests that make HTTP calls
expecting success responses immediately after hot-reload:
* `HotReloadConfigRuntimePathsEndToEndTest`: REST and GraphQL calls now
retry up to 5 times with 1 second delays
* `HotReloadConfigConnectionString`: REST call now uses
`WaitForRestEndpointAsync` helper
* `HotReloadConfigDatabaseType`: REST call now uses
`WaitForRestEndpointAsync` helper
Added a shared `WaitForRestEndpointAsync` helper method that polls a
REST endpoint until it returns the expected status code (5 retries, 1
second delay).
This follows the same retry pattern already established in
`HotReloadConfigDataSource`, which had this exact fix applied
previously.
## How was this tested?
Ran a batch of 10 pipeline runs which all succeeded.
<img width="1597" height="790" alt="image"
src="https://github.com/user-attachments/assets/d7665b53-ba53-45b2-9c8c-333e4e296551"
/>
0 commit comments