Guides
How to use service containers properly
Tests fail intermittently at startup.
4 min read
Tests fail intermittently at startup.
Why it happens
The job races the service container's readiness because no healthcheck is defined.
How to fix it
- Define a healthcheck with an appropriate interval and retry count
- Use docker compose up --wait when running compose rather than services
- Never use a fixed sleep as a readiness substitute
Your next build could be twice as fast, at half the price
Start free. Migrating away is the same one line, and we publish that diff too.
Related
How to scale self-hosted runnersSelf-hosted runners either queue at peak or sit idle and expensive.How to use runner groupsAny repository can schedule jobs on any runner.How to design a runner label strategyLabels grew organically and nobody knows which to use.Hosted or BYOC: how to chooseYou are unsure whether to use hosted runners or deploy into your own cloud.