summaryrefslogtreecommitdiff
path: root/core/src/main/resources
diff options
context:
space:
mode:
authorJason Tedor <jason@tedor.me>2016-06-10 10:18:06 -0400
committerGitHub <noreply@github.com>2016-06-10 10:18:06 -0400
commita25b8ee1bf2e70bc28f688731ef43962a3ef18ce (patch)
tree4ede94518ac46e797c347dcaeff652049591ad3b /core/src/main/resources
parent43e07c0c886223c65d26a4e3bdb7815ff15abe7d (diff)
Make random UUIDs reproducible in tests
Today we use a random source of UUIDs for assigning allocation IDs, cluster IDs, etc. Yet, the source of randomness for this is not reproducible in tests. Since allocation IDs end up as keys in hash maps, this means allocation decisions and not reproducible in tests and this leads to non-reproducible test failures. This commit modifies the behavior of random UUIDs so that they are reproducible under tests. The behavior for production code is not changed, we still use a true source of secure randomness but under tests we just use a reproducible source of non-secure randomness. It is important to note that there is a test, UUIDTests#testThreadedRandomUUID that relies on the UUIDs being truly random. Thus, we have to modify the setup for this test to use a true source of randomness. Thus, this is one test that will never be reproducible but it is intentionally so. Relates #18808
Diffstat (limited to 'core/src/main/resources')
0 files changed, 0 insertions, 0 deletions