From: Benny Baumann Date: Sun, 31 Jul 2016 16:20:10 +0000 (+0200) Subject: fix: Actually generate random IDs for use in tests X-Git-Url: https://code.wpia.club/?p=gigi.git;a=commitdiff_plain;h=0931c8e7e936837334372fa3c77d44e65b3e8df7;hp=0931c8e7e936837334372fa3c77d44e65b3e8df7 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 ---