Generalize consumeSlow and add stop support
Signed-off-by: Tõnis Tiigi <tonistiigi@gmail.com> (github: tonistiigi) Upstream-commit: 417e48e4a00c891e8fe5614ac6a1ef12de951f72 Component: engine
This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
||||
"bufio"
|
||||
"bytes"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net"
|
||||
"os"
|
||||
@@ -2462,7 +2461,7 @@ func TestRunSlowStdoutConsumer(t *testing.T) {
|
||||
if err := c.Start(); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
n, err := consumeSlow(stdout, 10000, 5*time.Millisecond)
|
||||
n, err := consumeWithSpeed(stdout, 10000, 5*time.Millisecond, nil)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user