diff --git a/aerospike/aerospike_test.go b/aerospike/aerospike_test.go index a94c24ec..427c28f0 100644 --- a/aerospike/aerospike_test.go +++ b/aerospike/aerospike_test.go @@ -66,13 +66,11 @@ func newTestStore(t testing.TB) *Storage { t.Helper() c, err := startAerospikeContainer(context.Background()) + testcontainers.CleanupContainer(t, c) if err != nil { t.Fatalf("Failed to start Aerospike container: %v", err) } - // Cleanup container - testcontainers.CleanupContainer(t, c) - // Extract host and port host, err := c.Host(context.TODO()) if err != nil {