]> WPIA git - gigi.git/commit
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)
commit0931c8e7e936837334372fa3c77d44e65b3e8df7
treea31363d886a0decd5445ef866089ceed9b046933
parentd0ee991d9ba982e43acd036c2d0592976ba9e9ff
fix: Actually generate random IDs for use in tests

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
tests/org/cacert/gigi/testUtils/ConfiguredTest.java