diff --git a/internal/worker/queue.go b/internal/worker/queue.go index 7c8f4d2a7f1..4ab607fd585 100644 --- a/internal/worker/queue.go +++ b/internal/worker/queue.go @@ -133,7 +133,7 @@ func (q *queue) Push(ctx context.Context, job JobFunc) error { } // Pop returns (JobFunc, nil) if the channnel, which will be used for queuing job, contains JobFunc. -// If pop returns error, Pos returns (nil, error) +// It returns (nil ,error) if it failed to pop from the job queue. func (q *queue) Pop(ctx context.Context) (JobFunc, error) { return q.pop(ctx, q.Len()) } diff --git a/internal/worker/queue_test.go b/internal/worker/queue_test.go index b81229651d5..1b5f667a0d4 100644 --- a/internal/worker/queue_test.go +++ b/internal/worker/queue_test.go @@ -806,7 +806,7 @@ func Test_queue_pop(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) cancel() return test{ - name: "return (JobFunc, error) when context canceld.", + name: "return (JobFunc, error) when context canceled.", args: args{ ctx: ctx, retry: 0,