Rename Cancelled to Canceled in operationtracker
Part of fixing misspellings.
This commit is contained in:
parent
9bd611e7c3
commit
bc8b65a099
|
@ -38,12 +38,12 @@ func TestOperation(t *testing.T) {
|
|||
t.Error("bad timestamp")
|
||||
}
|
||||
|
||||
if op.Cancelled() {
|
||||
if op.Canceled() {
|
||||
t.Error("should not be canceled")
|
||||
}
|
||||
|
||||
op.Cancel()
|
||||
if !op.Cancelled() {
|
||||
if !op.Canceled() {
|
||||
t.Error("should be canceled")
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ func TestOperationTracker_TrackNewOperation(t *testing.T) {
|
|||
t.Error("bad type")
|
||||
}
|
||||
|
||||
if op.Cancelled() != false {
|
||||
if op.Canceled() != false {
|
||||
t.Error("should not be canceled")
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,7 @@ func TestOperationTracker_TrackNewOperation(t *testing.T) {
|
|||
t.Fatal("should have created a new operation")
|
||||
}
|
||||
|
||||
if !op.Cancelled() {
|
||||
if !op.Canceled() {
|
||||
t.Fatal("should have canceled the original operation")
|
||||
}
|
||||
})
|
||||
|
|
|
@ -144,7 +144,7 @@ func (spt *Tracker) opWorker(pinF func(*optracker.Operation) error, prioCh, norm
|
|||
|
||||
// applyPinF returns true if the operation can be considered "DONE".
|
||||
func applyPinF(pinF func(*optracker.Operation) error, op *optracker.Operation) bool {
|
||||
if op.Cancelled() {
|
||||
if op.Canceled() {
|
||||
// operation was canceled. Move on.
|
||||
// This saves some time, but not 100% needed.
|
||||
return false
|
||||
|
@ -153,7 +153,7 @@ func applyPinF(pinF func(*optracker.Operation) error, op *optracker.Operation) b
|
|||
op.IncAttempt()
|
||||
err := pinF(op) // call pin/unpin
|
||||
if err != nil {
|
||||
if op.Cancelled() {
|
||||
if op.Canceled() {
|
||||
// there was an error because
|
||||
// we were canceled. Move on.
|
||||
return false
|
||||
|
|
Loading…
Reference in New Issue
Block a user