a25b8ee1bf
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 |
||
---|---|---|
.. | ||
src | ||
build.gradle |