diff options
| author | Teddy Wing | 2017-11-28 11:51:11 +0100 |
|---|---|---|
| committer | Teddy Wing | 2017-11-28 11:59:47 +0100 |
| commit | 65c42c9f176cbaedb53e5c7a49ce4e3724b04fb8 (patch) | |
| tree | fb6d824bd3baaa1dc5d2c1bfbf336ad77f19fb10 /app/javascript/journey_patterns | |
| parent | cd6e13d4ea86de054911a2c9bab0e733ba63095f (diff) | |
| download | chouette-core-65c42c9f176cbaedb53e5c7a49ce4e3724b04fb8.tar.bz2 | |
Referential spec: Add spec that two similar Referentials being persisted
Here we formalise a bug whereby two "identical" `Referential`s are able
to be saved even though Rails validation would normally prevent this. It
can happen when two `Referential`s are functionally identical (but have
different `slug`s, as this would trigger a Postgres error).
In practise, this happens when multiple imports of the same data are
launched at similar times.
We'll want to make this test pass by not allowing the identical
`Referential` to be created. This will be accomplished as agreed with
the team by a database table lock.
The threads and sleeps (in particular) are unfortunate necessities
needed to get the two `Referential`s to be saved at the same time.
TODO: Need to check this again with the threads & sleeps turned off to
confirm that this passes in that case (actually it doesn't), so this
test needs some modification in order to be correct.
Refs #5024
Diffstat (limited to 'app/javascript/journey_patterns')
0 files changed, 0 insertions, 0 deletions
