CI/CD & GitOps Practical By Samson Tanimawo, PhD Published Oct 2, 2025 4 min read

CI Test Isolation

Tests must be isolated.

Data

The single biggest source of test flake in any CI system is data pollution between tests. Test A inserts a row, test B reads it, test C truncates the table, test D runs in a different order than yesterday and now sees state it did not write. Each test individually looks correct. The suite, run in any order, fails intermittently. The fix is non-negotiable test data isolation.

What proper data isolation looks like:

The discipline sounds excessive until the team experiences a flaky CI suite. Then it becomes the cheapest investment they ever made.

Environment

Data is the easiest source of test pollution to fix. Environment is the harder one. Tests can leak through shared filesystems, shared sockets, shared memory, shared timing, shared external services. The strongest answer is hard environment isolation per test.

The investment in environment isolation looks like overkill until the team tries to debug a flaky test that only fails when test 47 in the suite happens to coincide with test 412 in another worker. At that point, the cost of hard isolation becomes obviously cheaper than the cost of the flake.

Flaky

The reason we go through all this trouble is that most "flaky tests" are not flaky tests. They are real tests catching real isolation failures, and the team is treating the symptom by retrying instead of fixing the cause. Investment in isolation pays back as a steep drop in the ambient flake rate.

The teams that take isolation seriously have CI suites that pass 99%+ of the time on green code. The teams that retry around the problem have CI suites that pass 80% on green code, which is functionally indistinguishable from broken. Nova AI Ops tracks flake rate per test, identifies isolation-dependent failures (order-sensitivity, port collisions, shared state) automatically, and quarantines flaky tests so the suite signal stays meaningful.