Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
inaciogu committed Jan 21, 2024
1 parent e16480a commit cfa751d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 4 additions & 4 deletions consumer/sqsclient_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func (ut *UnitTest) TestReceiveMessage() {

go client.ReceiveMessages("https://fake-queue-url", ch)

time.Sleep(500 * time.Millisecond)
time.Sleep(600 * time.Millisecond)

fmt.Println(len(ch))

Expand Down Expand Up @@ -293,7 +293,7 @@ func (uts *UnitTest) TestPoll() {

go client.Poll()

time.Sleep(400 * time.Millisecond)
time.Sleep(600 * time.Millisecond)

uts.mockSQSService.AssertCalled(uts.T(), "ReceiveMessage", &sqs.ReceiveMessageInput{
QueueUrl: aws.String("https://fake-queue-url"),
Expand Down Expand Up @@ -375,7 +375,7 @@ func (uts *UnitTest) TestPollPrefixBased() {

go client.Poll()

time.Sleep(400 * time.Millisecond)
time.Sleep(600 * time.Millisecond)

uts.mockSQSService.AssertCalled(uts.T(), "ListQueues", &sqs.ListQueuesInput{
QueueNamePrefix: aws.String("fake-queue-name"),
Expand All @@ -401,7 +401,7 @@ func (uts *UnitTest) TestStart() {

go client.Start()

time.Sleep(100 * time.Millisecond)
time.Sleep(600 * time.Millisecond)

uts.mockSQSService.AssertCalled(uts.T(), "ReceiveMessage", &sqs.ReceiveMessageInput{
QueueUrl: aws.String("https://fake-queue-url"),
Expand Down
4 changes: 4 additions & 0 deletions mocks/SQSService.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cfa751d

Please sign in to comment.