Skip to content

Commit

Permalink
typos (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
serbrech authored Mar 23, 2023
1 parent d8f17f5 commit 62bdaec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions v2/managedsettling.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ type ManagedSettlingOptions struct {
// and the RetryDecision decides to retry the message.
// The handler will sleep for the time calculated by the delayStrategy before Abandoning the message.
RetryDelayStrategy RetryDelayStrategy
// OnAbandoned is invoked when the handler returns an error. It is invoked after the message is abandoned or deadlettered.
// OnAbandoned is invoked when the handler returns an error. It is invoked after the message is abandoned.
OnAbandoned func(context.Context, *azservicebus.ReceivedMessage, error)
// OnDeadLettered is invoked after the ManagedSettling dead-letters a message.
// this occurs when the RetryDecision.CanRetry implementation returns false following an error returned by the handler
// It is invoked after the message is abandoned or deadlettered.
// It is invoked after the message is dead-lettered.
OnDeadLettered func(context.Context, *azservicebus.ReceivedMessage, error)
// OnCompleted is a func that is invoked when the handler does not return any error. it is invoked after the message is completed.
OnCompleted func(context.Context, *azservicebus.ReceivedMessage)
Expand Down
6 changes: 3 additions & 3 deletions v2/managedsettling_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
type fakeSettler struct {
abandoned bool
completed bool
conpleteErr error
completeErr error
deadlettered bool
deadletterOptions *azservicebus.DeadLetterOptions
defered bool
Expand All @@ -27,7 +27,7 @@ func (f *fakeSettler) AbandonMessage(ctx context.Context, message *azservicebus.

func (f *fakeSettler) CompleteMessage(ctx context.Context, message *azservicebus.ReceivedMessage, options *azservicebus.CompleteMessageOptions) error {
f.completed = true
return f.conpleteErr
return f.completeErr
}

func (f *fakeSettler) DeadLetterMessage(ctx context.Context, message *azservicebus.ReceivedMessage, options *azservicebus.DeadLetterOptions) error {
Expand Down Expand Up @@ -104,7 +104,7 @@ func TestManagedSettler_Handle(t *testing.T) {
{
name: "complete returns error triggers abandon hook",
hooks: &hooks{},
settler: fakeSettler{conpleteErr: fmt.Errorf("failed to complete msg")},
settler: fakeSettler{completeErr: fmt.Errorf("failed to complete msg")},
handlerResponse: nil, // handler succeeds
msg: &azservicebus.ReceivedMessage{},
expectation: func(t *testing.T, hooks *hooks, settler *fakeSettler) {
Expand Down

0 comments on commit 62bdaec

Please sign in to comment.