Problem/Motivation

This introduced PostgreSQL failure:
- https://www.drupal.org/pift-ci-job/1147872
- https://www.drupal.org/pift-ci-job/1147909

Drupal\Tests\search\Kernel\Migrate\d7\MigrateSearchPageTest::testSearchPage
Failed asserting that Array &0 (
    'rankings' => Array &1 (
        'promote' => 0
        'relevance' => 2
        'sticky' => 0
        'views' => 0
        'comments' => 4
    )
) is identical to Array &0 (
    'rankings' => Array &1 (
        'comments' => 4
        'promote' => 0
        'relevance' => 2
        'sticky' => 0
        'views' => 0
    )
).

/var/www/html/core/modules/search/tests/src/Kernel/Migrate/d7/MigrateSearchPageTest.php:43
/var/www/html/core/modules/search/tests/src/Kernel/Migrate/d7/MigrateSearchPageTest.php:79

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

heddn created an issue. See original summary.

quietone’s picture

Sort the arrays before testing as is done in /d6/MigrateTaxonomyTermTranslationTest.php

quietone’s picture

Title: [Postgress] Variable to config: search_active_modules » [PostgresSQL] Variable to config: search_active_modules

Typo in title

heddn’s picture

Status: Needs review » Reviewed & tested by the community

Fixes the issue. The order of results isn't particularly that interesting, so doing this in a ksort in the test is just fine.

alexpott’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
457 bytes

We can use config key ordering to make all the things consistent.

alexpott’s picture

Note that the order in the configuration is not significant. It is never "important" - we always get the rankings from the hook system first and then use this configuration - see \Drupal\node\Plugin\Search\NodeSearch::addNodeRankings().

alexpott’s picture

#6 is why I didn't add a post update hook to potentially save all the search page config entities.

larowlan’s picture

Status: Needs review » Reviewed & tested by the community

Looks good

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed b942654 and pushed to 8.7.x. Thanks!

Committed this because this is resulting in test fails in HEAD.

  • alexpott committed b942654 on 8.7.x
    Issue #3021838 by alexpott, quietone: [PostgresSQL] Variable to config:...

Status: Fixed » Closed (fixed)

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