Add more tests for AthConfigFlag hashing, fix bug from !68913
The config flag hashing wasn't properly accounting for changes introduced in !68913 (merged).
I'm fixing this in the hash function.
Details
What I would expect:
-
cloned flags, with the same content, hash identically to the original -
cloneAndReplaced flags should hash differently from the original, and any clones of the original
What I see without calling loadAllDynamicFlags:
- clone and deepcopy hash identically
👍 - calling
cloneAndReplaceon flags changes the hash👍 - calling
cloneagain (on the original flags) after this and hashing gives odd results:- it hashes identically to the
cloneAndReplaceflags❌ - it hashes differently from the original cloned flags
❌
- it hashes identically to the
Apparently the last case is expected because cloneAndReplace will load some flags and change the hash.
If instead I call loadAllDynamicFlags on each flag object, I get more weird results:
- clone and deepcopy hash identically
👍 - calling
cloneAndReplacedoes not change the hash on the returned object❌ - calling
cloneagain (on the original flags) after this and hashing gives the same hash as the original👍
There are still some odd things going on but this fixes the more serious ones, see !69786 (closed).
Edited by Dan Guest