#110665Optimize password hashing in unit tests
Description
Several unit tests perform production-cost Argon2 hashing even though they
test how callers interact with the password hashing API rather than the
hashing implementation itself.
Mock the password hash factory and hash implementation in tests for:
- AuthenticationService
- DataHandler
- SaveToDatabaseFinisher
The dedicated Argon2i and Argon2id tests should retain one production-cost
hash generation per algorithm. Independent password verification tests can
use low-cost Argon2 hashes, while rehash checks can use fixed hashes with the
required metadata.
The affected tests improve from approximately 7.28 seconds to 0.35 seconds
while retaining the same behavioral coverage. Production code remains
unchanged.
Reviews 2
History 14
-
Gerrit Code Review pushed patch set 1 for main to change 95747 status
NewUnder Review <span data-processor="relativetime" data-value="2026-09-09T17:31:16+00:00" > 09/09/26, 17:31 </span> -
Gerrit Code Review pushed patch set 2 for main to change 95747 <span data-processor="relativetime" data-value="2026-09-09T18:26:16+00:00" > 09/09/26, 18:26 </span>
-
Gerrit Code Review pushed patch set 1 for 14.3 to change 95763 <span data-processor="relativetime" data-value="2026-09-10T15:30:58+00:00" > 09/10/26, 15:30 </span>
-
Wouter Wolters commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-09-22T20:00:13+00:00" > 09/22/26, 20:00 </span>
Applied in changeset commit:495339a956aa07686f679a31ddd24eca92166b63.