# Fix the Race

> A technique for removing a race by ordering, locking or making the shared state immutable, instead of retrying the test.

Record: `lexicon:fix-the-race`
Kind: technique
Layer: [Atomic Boundary](https://banes-lab.com/records/layer/atomic-boundary.md)
Canonical: https://banes-lab.com/ontology/lexicon#lexicon-fix-the-race

Listed in [Lexicon terms](https://banes-lab.com/api/records/lexicon.md), after [Consistency Contract](https://banes-lab.com/records/lexicon/consistency-contract.md) and before [Apply Concurrency Control](https://banes-lab.com/records/lexicon/apply-concurrency-control.md).

## Category

- [Transactions / State / Concurrency](https://banes-lab.com/records/lexicon-category/transactions-state-concurrency.md)

## Refactors

- [Flaky Test Normalization](https://banes-lab.com/records/architecture/flaky-test-normalization.md)

## Linked from

- [Anti-patterns](https://banes-lab.com/ontology/principles/architecture-category-anti-patterns.md)
