//go:build release // +build release // The code in here is comprehensive as an integration // test and is long, hence is only run before releases. package client import ( "bytes" "context" "errors" "net" "regexp" "testing" "time" "github.com/stretchr/testify/require" ) func TestWSClientReconnectWithJitter(t *testing.T) { n := 8 var maxReconnectAttempts uint = 3 // Max wait time is ceil(1+0.999) + ceil(2+0.999) + ceil(4+0.999) + ceil(...) = 2 + 3 + 5 = 10s + ... maxSleepTime := time.Second * time.Duration(((1<