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:
-
clone
d flags, with the same content, hash identically to the original -
cloneAndReplace
d 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
cloneAndReplace
on flags changes the hash👍 - calling
clone
again (on the original flags) after this and hashing gives odd results:- it hashes identically to the
cloneAndReplace
flags❌ - 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
cloneAndReplace
does not change the hash on the returned object❌ - calling
clone
again (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