Skip to content

Commit

Permalink
linter: fix linting issues (#1457)
Browse files Browse the repository at this point in the history
Additionally fix the queue tests logic.

Signed-off-by: Maksim An <maksiman@microsoft.com>
  • Loading branch information
anmaxvl authored Jul 14, 2022
1 parent 12d4cd8 commit 873b8e1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/queue/queue_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ func TestEnqueueDequeueClose(t *testing.T) {
// go around make sure we get ErrClosed()
q.Close()
}
continue
} else if err != ErrQueueClosed {
t.Fatalf("expected to receive ErrQueueClosed, instead got: %s", err)
}
Expand Down Expand Up @@ -177,5 +178,9 @@ func TestDequeueBlock(t *testing.T) {
if err != nil {
t.Fatal(err)
}
case <-time.After(10 * time.Second):
// Closing the queue will finish the Dequeue go routine.
q.Close()
t.Fatal("timeout waiting for Dequeue go routine to complete")
}
}

0 comments on commit 873b8e1

Please sign in to comment.