Problem/Motivation

Consisent fail on Postgres - https://git.drupalcode.org/project/drupal/-/pipelines/96003

Random fail on MySQL, went away on retest:

    1)
    Drupal\Tests\standard\FunctionalJavascript\StandardPerformanceTest::testLoginBlock
    Failed asserting that 50 is identical to 49.
    
    /builds/issue/drupal-3390360/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:121
    /builds/issue/drupal-3390360/vendor/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php:79
    /builds/issue/drupal-3390360/core/profiles/standard/tests/src/FunctionalJavascript/StandardPerformanceTest.php:139
    /builds/issue/drupal-3390360/vendor/phpunit/phpunit/src/Framework/TestResult.php:728

https://git.drupalcode.org/issue/drupal-3390360/-/jobs/778969#L793
https://git.drupalcode.org/issue/drupal-3390360/-/jobs/786513#L792

Steps to reproduce

Run StandardPerformanceTest on postgres.

Proposed resolution

Loosen counts.

Remaining tasks

Follow up to add comments.

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

N/a

Issue fork drupal-3420401

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

Spokje created an issue. See original summary.

spokje’s picture

Component: phpunit » javascript
spokje’s picture

Issue summary: View changes

catch made their first commit to this issue’s fork.

catch’s picture

Status: Active » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Switch to a range makes sense, and know that was done on another ticket.

spokje’s picture

I swear, this specific test hates me: https://git.drupalcode.org/issue/drupal-3395986/-/jobs/805441#L780

Having said that, this MR would have prevent this failure.

quietone’s picture

Issue summary: View changes
Issue tags: +Needs followup

I read the issue summary and the comments. The proposed resolution is explained in comment #7.

Reading the MR I think it should have comments to explain 1) why a range is needed and 2) how the numbers to use were picked. I think that information will be useful to those who come after us. However, I do not wish to hold this up since it does cause test failures. I am going to tag for a followup.

alexpott’s picture

Priority: Normal » Critical
Status: Reviewed & tested by the community » Needs review

This very nearly fixes a critical regression in Postgres testing - head is failing due to this. See https://git.drupalcode.org/project/drupal/-/pipelines/96003

But unfortunately there's one more thing to fix in Postgres... will push a commit to MR once the current MR has finished testing on Postgres.

alexpott’s picture

Yep as you can see from https://git.drupalcode.org/project/drupal/-/jobs/828846 this still does not fix postgres.

alexpott’s picture

Title: StandardPerformanceTest::testLoginBlock Failed asserting that 50 is identical to 49. » StandardPerformanceTest fails randomly on MySQL and consistently on Postgres
Issue summary: View changes

Fixing the issue title.

Re #9 I'm not that comments are really possible. These number really represent a stake in the ground - this is what Drupal currently does. If we introduce something that improves them then we want this test fail and the issue that makes the improvement should adjust the numbers. If we have an issue that degrades them then we need to carefully consider why and if it worth it or if there is a better way.

alexpott’s picture

The latest commit on the MR is a nice colour of green for postgres... https://git.drupalcode.org/project/drupal/-/pipelines/96195

longwave’s picture

Wondering if an assertBetween() helper would make these slightly easier to read (and adjust in future).

alexpott’s picture

After discussions with @catch we decided to skip core performance tests on Postgres and SQLite because this is not really fixing the extra queries on postgres because they are due to the driver. So I reverted the postgres specific fix and added a skip in PerformanceTestBase.

catch’s picture

Status: Needs review » Reviewed & tested by the community

Looks great now.

spokje’s picture

Issue tags: -Needs followup

Removing follow-up tag because of explanation in #12.

longwave’s picture

Status: Reviewed & tested by the community » Fixed

Committed 46ed71c and pushed to 11.x. Thanks!

Did not cherry-pick cleanly to 10.2.x so not backporting this one.

  • longwave committed 46ed71cf on 11.x
    Issue #3420401 by alexpott, catch, Spokje, smustgrave, quietone,...

Status: Fixed » Closed (fixed)

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