Problem/Motivation

KernelTestBase does this:

    // Relax the password hashing cost in tests to avoid performance issues.
    $container->setParameter('password.algorithm', PASSWORD_BCRYPT);
    $container->setParameter('password.options', ['cost' => 4]);

Functional tests should do the same. This was harder prior to #3530186: Switch to argon2 as the default password hashing algorithm as we had to override the definition, now we can just set parameters.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3581948

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

longwave created an issue. See original summary.

longwave’s picture

Status: Active » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Seems pretty straight forward. Wonder if comment could be expanded but since it's the same as kernel test seems out of scope.

catch’s picture

It's possible we hit a very, very fast test runner, but also I think there's a good chance this is making a difference, e.g. https://git.drupalcode.org/project/drupal/-/jobs/9126339

  • catch committed 2a46c9c7 on 11.x
    task: #3581948 Reduce password hashing costs in functional tests
    
    By:...

  • catch committed 0d05b837 on main
    task: #3581948 Reduce password hashing costs in functional tests
    
    By:...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to main and 11.x, thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.