Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
#5 | 3021838-5.patch | 457 bytes | alexpott |
#2 | 3021838-2.patch | 1.07 KB | quietone |
Comments
Comment #2
quietone CreditAttribution: quietone at Acro Commerce commentedSort the arrays before testing as is done in /d6/MigrateTaxonomyTermTranslationTest.php
Comment #3
quietone CreditAttribution: quietone as a volunteer commentedTypo in title
Comment #4
heddnFixes the issue. The order of results isn't particularly that interesting, so doing this in a ksort in the test is just fine.
Comment #5
alexpottWe can use config key ordering to make all the things consistent.
Comment #6
alexpottNote 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()
.Comment #7
alexpott#6 is why I didn't add a post update hook to potentially save all the search page config entities.
Comment #8
larowlanLooks good
Comment #9
alexpottCommitted b942654 and pushed to 8.7.x. Thanks!
Committed this because this is resulting in test fails in HEAD.