*: Increase test timeout duration

See if CI passes this time.
This commit is contained in:
diamondburned 2022-04-02 22:42:39 -07:00
parent 92897b4fc3
commit 6b835a58c7
No known key found for this signature in database
GPG Key ID: D78C4471CE776659
2 changed files with 7 additions and 8 deletions

View File

@ -25,7 +25,7 @@ func doLog() {
}
func TestURL(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second)
ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
t.Cleanup(cancel)
u, err := URL(ctx)
@ -45,7 +45,7 @@ func TestURL(t *testing.T) {
func TestInvalidToken(t *testing.T) {
doLog()
ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second)
ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
t.Cleanup(cancel)
g, err := New(ctx, "bad token")
@ -92,7 +92,7 @@ func TestIntegration(t *testing.T) {
config := testenv.Must(t)
ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
t.Cleanup(cancel)
// NewGateway should call Start for us.
@ -110,7 +110,7 @@ func TestReuseGateway(t *testing.T) {
config := testenv.Must(t)
ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
t.Cleanup(cancel)
// NewGateway should call Start for us.
@ -178,8 +178,7 @@ func wait(t *testing.T, evCh chan interface{}) interface{} {
func gotimeout(t *testing.T, fn func(context.Context)) {
t.Helper()
// Try and reconnect for 20 seconds maximum.
ctx, cancel := context.WithTimeout(context.Background(), 20*time.Second)
ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
defer cancel()
var done = make(chan struct{})

View File

@ -94,7 +94,7 @@ func testIntegrationOnce(t *testing.T, s *testState) {
finish("receiving voice speaking event")
})
ctx, cancel := context.WithTimeout(context.Background(), 25*time.Second)
ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
t.Cleanup(cancel)
if err := v.JoinChannelAndSpeak(ctx, s.channel.ID, false, false); err != nil {
@ -257,7 +257,7 @@ func testReconnect(t *testing.T, interrupt func(*testState)) error {
t.Fatal("cannot")
}
ctx, cancel := context.WithTimeout(context.Background(), 25*time.Second)
ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
t.Cleanup(cancel)
if err := v.JoinChannelAndSpeak(ctx, s.channel.ID, false, false); err != nil {