We raised $3M for agent-native runners

Clean up independent test resources concurrently

Independent index deletions do not need a separate serial wait per index.

How Mastra used this technique

Read what Mastra changed and follow the original sources.

Clean up independent test resources concurrently

Couchbase cleanup replaced serial index deletion loops with Promise.all followed by one wait. This applies independent-step parallelism inside a test helper.

Use it when
Suite setup or cleanup serializes operations on independent resources.
Before applying it
Check service concurrency limits, error reporting and shared state, and confirm deletions completed before later tests run.

Company Playbooks