Skip to content

Commit

Permalink
Unify 15s timeout in the end of tests
Browse files Browse the repository at this point in the history
Small reduction.
Seems enough for CI as well.
  • Loading branch information
CarlosNihelton committed Oct 11, 2023
1 parent 9090edd commit a84f602
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions end-to-end/manual_token_input_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,11 @@ func TestManualTokenInput(t *testing.T) {
require.NoErrorf(t, err, "Setup: could not wake distro up: %v. %s", err, out)
}

maxTimeout := 15 * time.Second
const maxTimeout = 15 * time.Second

if !tc.wantAttached {
time.Sleep(maxTimeout)
proCtx, cancel := context.WithTimeout(ctx, 5*time.Second)
proCtx, cancel := context.WithTimeout(ctx, maxTimeout)
defer cancel()
attached, err := distroIsProAttached(t, proCtx, d)
require.NoError(t, err, "could not determine if distro is attached")
Expand Down
4 changes: 2 additions & 2 deletions end-to-end/organization_token_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ func TestOrganizationProvidedToken(t *testing.T) {
require.NoErrorf(t, err, "Setup: could not wake distro up: %v. %s", err, out)
}

const maxTimeout = 30 * time.Second
const maxTimeout = 15 * time.Second

if !tc.wantAttached {
time.Sleep(maxTimeout)
proCtx, cancel := context.WithTimeout(ctx, 5*time.Second)
proCtx, cancel := context.WithTimeout(ctx, maxTimeout)
defer cancel()
attached, err := distroIsProAttached(t, proCtx, d)
require.NoError(t, err, "could not determine if distro is attached")
Expand Down

0 comments on commit a84f602

Please sign in to comment.