Skip to content

Commit

Permalink
Add new testing condition
Browse files Browse the repository at this point in the history
  • Loading branch information
umpc committed Jul 6, 2017
1 parent 8d043c5 commit 9f7a133
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions iter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,13 @@ func TestCancelCustomIterCh(t *testing.T) {
defer ch.Close()

go func(ch IterChCloser) {
i := 0
for range ch.Records() {
if i == 50 {
ch.Close()
}
i++
}
if err := verifyRecords(ch.Records(), params.Reversed); err != nil {
if err.Error() != "Channel was nil." {
t.Fatal(err)
Expand Down

0 comments on commit 9f7a133

Please sign in to comment.