mirror of
https://github.com/go-gitea/gitea
synced 2025-07-07 19:17:21 +00:00
Use test context in tests and new loop system in benchmarks (#33648)
Replace all contexts in tests with go1.24 t.Context() --------- Co-authored-by: Giteabot <teabot@gitea.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@ -5,7 +5,6 @@
|
||||
package pull
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strconv"
|
||||
"testing"
|
||||
"time"
|
||||
@ -33,7 +32,7 @@ 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})
|
||||
|
Reference in New Issue
Block a user