Skip to content

Commit

Permalink
refactor: remove duplicating literal in testDynamoMQClientReceiveMess…
Browse files Browse the repository at this point in the history
…ageSequence
  • Loading branch information
vvatanabe committed Nov 15, 2023
1 parent 4325def commit 5277be3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,15 +319,15 @@ func testDynamoMQClientReceiveMessageSequence(t *testing.T, useFIFO bool) {

for i, want := range wants {
result, err := client.ReceiveMessage(ctx, &ReceiveMessageInput{})
_ = assertError(t, err, nil, fmt.Sprintf("ReceiveMessage() [%d]", i))
assertDeepEqual(t, result, want, fmt.Sprintf("ReceiveMessage() [%d]", i))
_ = assertError(t, err, nil, fmt.Sprintf("ReceiveMessage() [%d-1]", i))
assertDeepEqual(t, result, want, fmt.Sprintf("ReceiveMessage() [%d-2]", i))

if !useFIFO {
return
}

_, err = client.ReceiveMessage(ctx, &ReceiveMessageInput{})
_ = assertError(t, err, &EmptyQueueError{}, fmt.Sprintf("ReceiveMessage() [%d]", i))
_ = assertError(t, err, &EmptyQueueError{}, fmt.Sprintf("ReceiveMessage() [%d-3]", i))

_, err = client.DeleteMessage(ctx, &DeleteMessageInput{
ID: result.ID,
Expand Down

0 comments on commit 5277be3

Please sign in to comment.