- Notifications
You must be signed in to change notification settings - Fork1k
Commit1312cd9
committed
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#996Change-Id: I466815d35f03bb75ef448d6f3431cd4b6efe2570Signed-off-by: Thomas Kosiewski <tk@coder.com>1 parente189088 commit1312cd9
2 files changed
+45
-26
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2 | 2 |
| |
3 | 3 |
| |
4 | 4 |
| |
5 |
| - | |
6 |
| - | |
7 | 5 |
| |
8 | 6 |
| |
9 | 7 |
| |
| |||
23 | 21 |
| |
24 | 22 |
| |
25 | 23 |
| |
26 |
| - | |
| 24 | + | |
| 25 | + | |
27 | 26 |
| |
28 |
| - | |
29 |
| - | |
30 |
| - | |
31 |
| - | |
32 |
| - | |
33 |
| - | |
34 |
| - | |
35 |
| - | |
36 |
| - | |
37 | 27 |
| |
38 |
| - | |
39 |
| - | |
| 28 | + | |
40 | 29 |
| |
41 | 30 |
| |
42 | 31 |
| |
| |||
57 | 46 |
| |
58 | 47 |
| |
59 | 48 |
| |
60 |
| - | |
| 49 | + | |
| 50 | + | |
61 | 51 |
| |
62 |
| - | |
63 |
| - | |
64 |
| - | |
65 |
| - | |
66 |
| - | |
67 |
| - | |
68 |
| - | |
69 |
| - | |
70 |
| - | |
71 | 52 |
| |
72 |
| - | |
73 |
| - | |
| 53 | + | |
74 | 54 |
| |
75 | 55 |
| |
76 | 56 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + |
0 commit comments
Comments
(0)