Skip to content

Commit 6e7238d

Browse files
committed
test: wait longer
1 parent ba8f5f8 commit 6e7238d

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

tests/integration/pull_update_test.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,10 @@ func TestAPIPullUpdate(t *testing.T) {
4949
assert.EqualValues(t, 0, diffCount.Behind)
5050
assert.EqualValues(t, 2, diffCount.Ahead)
5151

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)
5456
})
5557
}
5658

@@ -80,8 +82,10 @@ func TestAPIPullUpdateByRebase(t *testing.T) {
8082
assert.EqualValues(t, 0, diffCount.Behind)
8183
assert.EqualValues(t, 1, diffCount.Ahead)
8284

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)
8589
})
8690
}
8791

0 commit comments

Comments
 (0)