Commit 11e7bc2
fix: TestGHEPullRequestGitopsCommentCancel race
The E2E test TestGithubGHEPullRequestGitopsCommentCancel in
test/github_pullrequest_retest_test.go:64 fails intermittently because
it uses the wrong wait strategy after issuing /cancel. The test uses
UntilRepositoryUpdated with MinNumberStatus: 3, which passes immediately
when there are already ≥3 repo statuses — before the cancel has taken
effect. The last status is then ConditionTrue (succeeded) instead of the
expected ConditionFalse (cancelled)
Reuse the same robust pattern that we already do in
test/github_push_retest_test.go:194-211, it does this:
1. Waits for the PipelineRun to have Cancelled reason via
UntilPipelineRunHasReason
2. Then waits for the Repository status to have Cancelled reason via
UntilRepositoryHasStatusReason
3. Falls back to checking controller logs if the cancel didn't propagate1 parent 0faad24 commit 11e7bc2
1 file changed
+10
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| 16 | + | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
| |||
98 | 100 | | |
99 | 101 | | |
100 | 102 | | |
101 | | - | |
| 103 | + | |
102 | 104 | | |
103 | 105 | | |
104 | | - | |
105 | | - | |
| 106 | + | |
| 107 | + | |
106 | 108 | | |
107 | 109 | | |
108 | | - | |
109 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
110 | 113 | | |
111 | 114 | | |
112 | | - | |
113 | | - | |
| 115 | + | |
| 116 | + | |
114 | 117 | | |
115 | | - | |
116 | 118 | | |
117 | 119 | | |
118 | 120 | | |
| |||
0 commit comments