Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add spec for BatchBuilder contention
Previously we had an issue where BatchBuilder would create the wrong number of promotion codes if it encountered a conflict. Out specs didn't catch this. This commit adds an additional spec which runs the BatchBuilder with settings that make it extremely likely that there will a conflict: from a space of 100 possible codes (00 to 99) we generate 50. An online birthday problem calculator tells me this is 99.99997% likely that the generator will encounter at least one conflict. That seems plenty. I haven't verified this, but intuitively it seems very likely.
- Loading branch information