Problem/Motivation
LocalesLocationAddIndexUpdateTest::testExistingIndex() is failing on PostgreSQL. The array of indexes has unique keys and the keys are sorted.
https://git.drupalcode.org/project/drupal/-/blob/11.x/core/modules/pgsql...
https://git.drupalcode.org/project/drupal/-/blob/11.x/core/modules/pgsql...
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Issue fork drupal-3458922
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:
- 3458922-fix-index-test
changes, plain diff MR !8654
Comments
Comment #3
quietone commentedComment #4
quietone commentedComment #5
alexpottI think given we have to sort the index on Postgres the assertions are largely pointless.
Comment #6
alexpottComment #8
alexpottThis looks great now.
Comment #9
longwaveWhy not just check that the index exists after the update? We should trust that the database driver has tests that ensure an index is actually structured correctly, we don't need to re-assert that here.
Comment #10
alexpottOpened #3458971: Postrges implementation of introspectIndexSchema is incorrect to fix the postgres schema inspection issue - I think the postgres implementation is incorrect and sorting by column name makes the method less valuable.
Comment #11
alexpott@longwave pointed out we should be able to trust our APIs and not assrt against the internals - so removed the assertions on index structure.
Comment #12
longwaveLooks good to me.
Comment #13
catchCommitted/pushed to 11.x and cherry-picked back through to 10.3.x, thanks!
Comment #18
catch