add an integration test for datagram transfers

This commit is contained in:
Marten Seemann
2019-10-06 22:12:02 +02:00
parent 98145368cd
commit 1728a6c90c
3 changed files with 151 additions and 11 deletions

View File

@@ -8,9 +8,7 @@ import (
"io/ioutil"
mrand "math/rand"
"net"
"os"
"runtime/pprof"
"strconv"
"strings"
"sync/atomic"
"time"
@@ -181,15 +179,6 @@ var _ = Describe("Timeout tests", func() {
Context("timing out at the right time", func() {
var idleTimeout time.Duration
scaleDuration := func(d time.Duration) time.Duration {
scaleFactor := 1
if f, err := strconv.Atoi(os.Getenv("TIMESCALE_FACTOR")); err == nil { // parsing "" errors, so this works fine if the env is not set
scaleFactor = f
}
Expect(scaleFactor).ToNot(BeZero())
return time.Duration(scaleFactor) * d
}
BeforeEach(func() {
idleTimeout = scaleDuration(100 * time.Millisecond)
})