diff --git a/tests/authenticate_test.go b/tests/authenticate_test.go index 624d7be9..b1ab2428 100644 --- a/tests/authenticate_test.go +++ b/tests/authenticate_test.go @@ -94,7 +94,7 @@ func TestAuthenticateTooManyAttemptsMany(t *testing.T) { c[i].C(tag + " AUTHENTICATE PLAIN") c[i].S("+") c[i].C(authString).NO(tag) - }), time.Second) + }), 990*time.Millisecond) }) } diff --git a/tests/login_test.go b/tests/login_test.go index be591e46..ffe018b7 100644 --- a/tests/login_test.go +++ b/tests/login_test.go @@ -99,7 +99,7 @@ func TestLoginCapabilities(t *testing.T) { }) } -func TestLoginTooManyAttemps(t *testing.T) { +func TestLoginTooManyAttempts(t *testing.T) { runOneToOneTest(t, defaultServerOptions(t), func(c *testConnection, _ *testSession) { // 3 attempts. c.C("A001 login user badpass").NO("A001") @@ -109,12 +109,12 @@ func TestLoginTooManyAttemps(t *testing.T) { // The client should be jailed for 1 sec. require.Greater(t, timeFunc(func() { c.C("A001 login user badpass").NO("A001") - }), time.Second) + }), 990*time.Millisecond) // After unjailed, get direct answer. require.Less(t, timeFunc(func() { c.C("A001 login user pass").OK("A001") - }), time.Second) + }), 990*time.Millisecond) }) } @@ -134,7 +134,7 @@ func TestLoginTooManyAttemptsMany(t *testing.T) { wg.Go(func() { require.Greater(t, timeFunc(func() { c[i].C("A001 login user badpass").NO("A001") - }), time.Second) + }), 990*time.Millisecond) }) }