adjust test sleep timing to avoid spurious failure
- refactor ConsumeWithSpeed - documentation Signed-off-by: Morgan Bauer <mbauer@us.ibm.com>
This commit is contained in:
parent
f576cf770a
commit
995814da2d
2 changed files with 15 additions and 15 deletions
|
@ -363,7 +363,7 @@ func TestConsumeWithSpeed(t *testing.T) {
|
|||
reader := strings.NewReader("1234567890")
|
||||
chunksize := 2
|
||||
|
||||
bytes1, err := ConsumeWithSpeed(reader, chunksize, 1*time.Millisecond, nil)
|
||||
bytes1, err := ConsumeWithSpeed(reader, chunksize, 1*time.Second, nil)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
@ -385,7 +385,7 @@ func TestConsumeWithSpeedWithStop(t *testing.T) {
|
|||
stopIt <- true
|
||||
}()
|
||||
|
||||
bytes1, err := ConsumeWithSpeed(reader, chunksize, 2*time.Millisecond, stopIt)
|
||||
bytes1, err := ConsumeWithSpeed(reader, chunksize, 20*time.Millisecond, stopIt)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue