Add cancellation reason tracking with user/system codes and UI
This commit is contained in:
@@ -33,10 +33,15 @@ func TestQueue(t *testing.T) {
|
||||
t.Errorf("Enqueue(1) again = %v, want ErrAlreadyRunning", err)
|
||||
}
|
||||
|
||||
q.Cancel(1)
|
||||
q.Cancel(1, true)
|
||||
if !cancelCalled {
|
||||
t.Error("Cancel should have called the cancel func")
|
||||
}
|
||||
if !q.IsCancelledByUser(1) {
|
||||
t.Error("IsCancelledByUser should return true after Cancel(1, true)")
|
||||
}
|
||||
|
||||
q.Dequeue(1)
|
||||
|
||||
q.Dequeue(1)
|
||||
if q.IsRunning(1) {
|
||||
|
||||
Reference in New Issue
Block a user