Skip to content
This repository has been archived by the owner on Nov 24, 2024. It is now read-only.

Commit

Permalink
lint warn
Browse files Browse the repository at this point in the history
  • Loading branch information
gammazero committed Nov 23, 2024
1 parent 4e00f89 commit a02dfca
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions channelqueue_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package channelqueue_test

import (
"errors"
"fmt"
"testing"
"time"

Expand Down Expand Up @@ -176,17 +177,20 @@ func TestDouble(t *testing.T) {
}
ch.Close()
}()
var err error
go func() {
var i int
for val := range ch.Out() {
if i != val {
t.Fatalf("expected %d but got %d", i, val)
err = fmt.Errorf("expected %d but got %d", i, val)
return
}
recvCh.In() <- i
i++
}
if i != msgCount {
t.Fatalf("expected %d messages from ch, got %d", msgCount, i)
err = fmt.Errorf("expected %d messages from ch, got %d", msgCount, i)
return
}
recvCh.Close()
}()
Expand All @@ -197,6 +201,9 @@ func TestDouble(t *testing.T) {
}
i++
}
if err != nil {
t.Fatal(err)
}
if i != msgCount {
t.Fatalf("expected %d messages from recvCh, got %d", msgCount, i)
}
Expand Down

0 comments on commit a02dfca

Please sign in to comment.