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
test(oauth2provider): deflake OAuth2 metadata tests with readiness wait
Fix flake in TestOAuth2AuthorizationServerMetadata by polling the .well-known endpoints until they return 200 and valid JSON, using testutil.Eventually.
Root cause: the test server can accept requests before the real handler is installed in coderdtest, returning 200 with an empty body which causes JSON decode EOF. The readiness loop avoids this race without sleeps and holds under t.Parallel().
This fixes the following issue: coder/internal#996
Change-Id: I466815d35f03bb75ef448d6f3431cd4b6efe2570
Signed-off-by: Thomas Kosiewski <[email protected]>
0 commit comments