Skip to content

Commit

Permalink
Add new test for Iter Close methods with and without a send timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
umpc committed Jul 6, 2017
1 parent e7083b5 commit 8b578bf
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions iter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,19 +329,25 @@ func TestCloseCustomIterCh(t *testing.T) {
earlierDate := time.Date(1, 1, 1, 0, 0, 0, 0, time.UTC)
laterDate := time.Now()

func() {
params := IterChParams{
LowerBound: earlierDate,
UpperBound: laterDate,
}
ch, err := sm.IterCh()
if err != nil {
t.Fatal(err)
}

ch, err := sm.CustomIterCh(params)
if err != nil {
t.Fatal(err)
}
ch.Close()

ch.Close()
}()
params := IterChParams{
SendTimeout: 5 * time.Minute,
LowerBound: earlierDate,
UpperBound: laterDate,
}

ch, err = sm.CustomIterCh(params)
if err != nil {
t.Fatal(err)
}

ch.Close()
}

func TestIterFunc(t *testing.T) {
Expand Down

0 comments on commit 8b578bf

Please sign in to comment.