File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -49,8 +49,10 @@ func TestAPIPullUpdate(t *testing.T) {
49
49
assert .EqualValues (t , 0 , diffCount .Behind )
50
50
assert .EqualValues (t , 2 , diffCount .Ahead )
51
51
52
- // wait for async operations triggered by AddTestPullRequestTask
53
- time .Sleep (time .Second )
52
+ // Wait for async operations triggered by AddTestPullRequestTask.
53
+ // A few seconds is safe enough, but maybe a bit long.
54
+ // Considering there are many tests that take tens of seconds, I think that's OK.
55
+ time .Sleep (5 * time .Second )
54
56
})
55
57
}
56
58
@@ -80,8 +82,10 @@ func TestAPIPullUpdateByRebase(t *testing.T) {
80
82
assert .EqualValues (t , 0 , diffCount .Behind )
81
83
assert .EqualValues (t , 1 , diffCount .Ahead )
82
84
83
- // wait for async operations triggered by AddTestPullRequestTask
84
- time .Sleep (time .Second )
85
+ // Wait for async operations triggered by AddTestPullRequestTask.
86
+ // A few seconds is safe enough, but maybe a bit long.
87
+ // Considering there are many tests that take tens of seconds, I think that's OK.
88
+ time .Sleep (5 * time .Second )
85
89
})
86
90
}
87
91
You can’t perform that action at this time.
0 commit comments