]> WPIA git - gigi.git/commitdiff
fix: Actually generate random IDs for use in tests
authorBenny Baumann <BenBE1987@gmx.net>
Sun, 31 Jul 2016 16:20:10 +0000 (18:20 +0200)
committerBenny Baumann <BenBE1987@gmx.net>
Mon, 1 Aug 2016 23:36:08 +0000 (01:36 +0200)
Collission probability: 1 in 2**40 (if Random numbers are actually random)

Having the createUniqueName method synchronized might be slower, but ensures
that count is always incremented for every name generated; even if the PRNG
unexpectedly fails.

We're not using SecureRandom here though, due to issues with the Unit Tests
otherwise hanging without any apparent reason. Also only 16 characters per
generated ID to avoid database field limits.

Change-Id: I52668471aa82e44981a3410d3f271f1a261c5dc6


No differences found