Skip to content

Commit

Permalink
Fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
hjr265 committed Jan 23, 2024
1 parent 936f704 commit 977c4d2
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2049,25 +2049,27 @@ func TestIntegrationGetNextPublishSeqNoRace(t *testing.T) {
}

wg := sync.WaitGroup{}
fail := false

wg.Add(2)

go func() {
defer wg.Done()
n := ch.GetNextPublishSeqNo()
if n <= 0 {
t.Fatalf("wrong next publish seqence number, expected: > %d, got: %d", 0, n)
}
_ = ch.GetNextPublishSeqNo()
}()

go func() {
defer wg.Done()
if err := ch.PublishWithContext(context.TODO(), "test-get-next-pub-seq", "", false, false, Publishing{}); err != nil {
t.Fatalf("publish error: %v", err)
t.Logf("publish error: %v", err)
fail = true
}
}()

wg.Wait()
if fail {
t.FailNow()
}

n = ch.GetNextPublishSeqNo()
if n != 2 {
Expand Down

0 comments on commit 977c4d2

Please sign in to comment.