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
Drupal\Tests\migrate_drupal\Kernel\d6\FieldDiscoveryTest is randomly failing on PostgreSQL. See https://www.drupal.org/pift-ci-job/1223254
1) Drupal\Tests\migrate_drupal\Kernel\d6\FieldDiscoveryTest::testGetAllFields
Failed asserting that Array &0 (
0 => 'employee'
1 => 'test_planet'
2 => 'page'
3 => 'test_page'
4 => 'story'
) is identical to Array &0 (
0 => 'employee'
1 => 'test_planet'
2 => 'page'
3 => 'story'
4 => 'test_page'
).
Proposed resolution
Fix it
Remaining tasks
User interface changes
None
API changes
None
Data model changes
None
Release notes snippet
N/a
Comment | File | Size | Author |
---|---|---|---|
#6 | 3038892-3.patch | 598 bytes | alexpott |
Comments
Comment #2
alexpottComment #3
alexpottAdding order to duplicate default MySQL order based on key.
Comment #4
quietone CreditAttribution: quietone as a volunteer commented@alexpott, thanks.
Comment #5
andypostClosed as duplicate #3038899: Fix postgresql tests after 2951550
I bet on Alex fix - because migrations use iterators and ordering for pgsql is unexpected, at least no reason to sort expected array cos you define it one line above
Comment #6
alexpottRe-uploading #3 since that fixes the root cause and makes postgres and mysql migrations consistent.
Comment #7
quietone CreditAttribution: quietone as a volunteer commentedSorry, 'twas an accident to upload my solution, the fix from alexpott is better.
Comment #8
andypostLet's go this way
Comment #9
mikelutzI support this approach, if we can force things to come back in the same order every time, we certainly should. +1 RTBC as a Migrate Maintainer.
Comment #12
larowlanCommitted 6896b4e and pushed to 8.8.x. Thanks!
C/p as c09f7d10cf and pushed to 8.7.x