aboutsummaryrefslogtreecommitdiffstats
path: root/services/pull/check_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/pull/check_test.go')
-rw-r--r--services/pull/check_test.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/services/pull/check_test.go b/services/pull/check_test.go
index dcf5f7b93a..fa3a676ef1 100644
--- a/services/pull/check_test.go
+++ b/services/pull/check_test.go
@@ -5,7 +5,6 @@
package pull
import (
- "context"
"strconv"
"testing"
"time"
@@ -33,11 +32,11 @@ func TestPullRequest_AddToTaskQueue(t *testing.T) {
cfg, err := setting.GetQueueSettings(setting.CfgProvider, "pr_patch_checker")
assert.NoError(t, err)
- prPatchCheckerQueue, err = queue.NewWorkerPoolQueueWithContext(context.Background(), "pr_patch_checker", cfg, testHandler, true)
+ prPatchCheckerQueue, err = queue.NewWorkerPoolQueueWithContext(t.Context(), "pr_patch_checker", cfg, testHandler, true)
assert.NoError(t, err)
pr := unittest.AssertExistsAndLoadBean(t, &issues_model.PullRequest{ID: 2})
- AddToTaskQueue(db.DefaultContext, pr)
+ StartPullRequestCheckImmediately(db.DefaultContext, pr)
assert.Eventually(t, func() bool {
pr = unittest.AssertExistsAndLoadBean(t, &issues_model.PullRequest{ID: 2})
@@ -52,7 +51,7 @@ func TestPullRequest_AddToTaskQueue(t *testing.T) {
select {
case id := <-idChan:
- assert.EqualValues(t, pr.ID, id)
+ assert.Equal(t, pr.ID, id)
case <-time.After(time.Second):
assert.FailNow(t, "Timeout: nothing was added to pullRequestQueue")
}