Commit 56d3f72
committed
test(websocket): gate the bind/debug/ignore specs on the response arriving
These three sent a request, slept a fixed 100ms, then asserted on
`updates.size`. That is a race, not a wait: under any extra load the
response has not arrived yet and the spec fails with "expected 1, got 0"
somewhere unrelated to whatever the branch actually changed.
`wait_for_updates` already exists for exactly this, with a comment saying
so, and the `receives updates` spec already uses it — these three were
simply never converted. The helper polls to a 5s deadline and fails
loudly on timeout, so a genuine regression still reports as one.
Found while merging the Azure consent stack: the `debug` spec failed
twice in a row on a branch that only touched the consent controller,
while passing on master. Six extra examples were enough to tip it.1 parent 311bcf8 commit 56d3f72
1 file changed
Lines changed: 7 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
| 124 | + | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
| 133 | + | |
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
| 146 | + | |
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
| 155 | + | |
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| |||
0 commit comments