Skip to content

Commit

Permalink
♻️ Remove context timeouts in tests due to slow runner
Browse files Browse the repository at this point in the history
  • Loading branch information
elgohr committed Dec 25, 2023
1 parent 0d71b96 commit b3a5e30
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions localstack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func TestWithLabels(t *testing.T) {
l, err := localstack.NewInstance(localstack.WithLabels(s.labels))
require.NoError(t, err)

ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
ctx, cancel := context.WithCancel(context.Background())
defer cancel()

require.NoError(t, l.StartWithContext(ctx))
Expand Down Expand Up @@ -240,7 +240,7 @@ func TestLocalStackWithContext(t *testing.T) {
},
} {
t.Run(s.name, func(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
l, err := localstack.NewInstance(s.input...)
require.NoError(t, err)
Expand All @@ -254,7 +254,7 @@ func TestLocalStackWithIndividualServicesOnContext(t *testing.T) {
cl := &http.Client{Timeout: time.Second}
for service := range localstack.AvailableServices {
t.Run(service.Name, func(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
ctx, cancel := context.WithCancel(context.Background())
l, err := localstack.NewInstance()
require.NoError(t, err)
require.NoError(t, l.StartWithContext(ctx, service))
Expand Down Expand Up @@ -327,7 +327,7 @@ func TestInstanceStartedTwiceWithoutLeaking(t *testing.T) {
}

func TestContextInstanceStartedTwiceWithoutLeaking(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
l, err := localstack.NewInstance()
require.NoError(t, err)
Expand Down

0 comments on commit b3a5e30

Please sign in to comment.