Skip to content

Commit 873b8e1

Browse files
authored
linter: fix linting issues (#1457)
Additionally fix the queue tests logic. Signed-off-by: Maksim An <[email protected]>
1 parent 12d4cd8 commit 873b8e1

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

internal/queue/queue_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ func TestEnqueueDequeueClose(t *testing.T) {
5050
// go around make sure we get ErrClosed()
5151
q.Close()
5252
}
53+
continue
5354
} else if err != ErrQueueClosed {
5455
t.Fatalf("expected to receive ErrQueueClosed, instead got: %s", err)
5556
}
@@ -177,5 +178,9 @@ func TestDequeueBlock(t *testing.T) {
177178
if err != nil {
178179
t.Fatal(err)
179180
}
181+
case <-time.After(10 * time.Second):
182+
// Closing the queue will finish the Dequeue go routine.
183+
q.Close()
184+
t.Fatal("timeout waiting for Dequeue go routine to complete")
180185
}
181186
}

0 commit comments

Comments
 (0)