Commit c24bad0
committed
test: fix webhook test race condition
The webhook test was creating the GitRepo resource after pushing content,
which caused a race condition. The git push would trigger the post-receive
webhook, but the GitRepo resource didn't exist yet, so the webhook was
ignored. With polling disabled (24h), the GitRepo never synced.
Fixed by creating the GitRepo resource first, then pushing content. This
ensures the webhook can find and update the GitRepo when triggered.
This also speeds up the test significantly (~14s vs ~21s) since the webhook
triggers immediately instead of waiting for timeout-based retries.1 parent 33e74f3 commit c24bad0
1 file changed
+6
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
| 272 | + | |
| 273 | + | |
276 | 274 | | |
277 | 275 | | |
278 | 276 | | |
| |||
287 | 285 | | |
288 | 286 | | |
289 | 287 | | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
290 | 292 | | |
291 | 293 | | |
292 | 294 | | |
| |||
0 commit comments