Integration Test Hell: An Honest CI War Story
Some of the most honest documentation of a project lives in its commit log. Ours has a four-day stretch where the messages degrade from real words into pure frustration: t, tr, try try try, cicicicicicici, asdf, one more time. That was the battle to get Elasticsearch- and Redis-backed integration tests running reliably in GitLab CI using testcontainers.
What actually fixed it was less dramatic than the commit history suggests: switching to a service-based approach instead of spinning up ad-hoc containers per test, adding explicit waits for Elasticsearch's real startup time instead of assuming it was ready, and setting sane resource limits so the runner didn't starve itself. The lesson isn't the fix — it's that flaky CI with ephemeral service containers is normal, and it's worth documenting the messy middle instead of pretending the first version worked.