A policy layer in an agent system makes decisions: what to remember, when to write it, what to retrieve, when to evict. In production every one of those decisions crosses a network boundary into a memory store, whether that is a database, a key-value service or a vector index. The policy itself is a few branches and comparisons. The store is the slow part.
The delay is not one thing. Connection setup and authentication handshakes dominate the first call. Every read and write pays a round-trip. Test isolation demands cleanup between cases, which is usually another round-trip. Parallel runners contend for the same backing service and either serialize or fail with interference, a problem Microsoft documents as a common reason tests against external resources get flaky choosing a testing strategy.
The fix is the standard test double: an object with the same interface that keeps state in a dictionary. It works because the policy's job is to decide, not to prove the network functions. When a double replaces an external resource, each test owns its own in-memory state and is isolated from every other test by construction choosing a testing strategy. That removes both the cleanup step and the contention.
Numbers make the scale concrete. Say a local store round-trip costs 4 ms and your policy suite makes 12 store operations per test across 400 tests. That is 4,800 operations and roughly 19 seconds of pure waiting, before any remote latency multiplies it. The same suite against a dictionary finishes the same 4,800 operations well under a tenth of a second. The policy logic did not change. You deleted the I/O.
One design point matters more than the rest: you are not stubbing methods to return canned values. You are writing a fake that owns real state. A write followed by a read returns what was written, TTLs actually expire, versions actually advance. That is what separates a meaningful policy test from a test that asserts your mocks agree with themselves.



