Enhance pkg/{httputils,integration}, distribution/xfer unit tests

- Make it possible to define a shorter waiting time of httputils
- Make a small hack to reduce the waiting time on distribution/xfer

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 522bfd926bcd8b031019e31cea41ce559cebc9b8
Component: engine
This commit is contained in:
Vincent Demeester
2016-12-23 21:09:29 +01:00
parent 10cdae676f
commit 4f858d145b
8 changed files with 42 additions and 25 deletions

View File

@ -234,7 +234,7 @@ func TestConsumeWithSpeed(t *testing.T) {
reader := strings.NewReader("1234567890")
chunksize := 2
bytes1, err := ConsumeWithSpeed(reader, chunksize, 1*time.Second, nil)
bytes1, err := ConsumeWithSpeed(reader, chunksize, 10*time.Millisecond, nil)
if err != nil {
t.Fatal(err)
}