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.
My tests of the core extensions has intermittent failures in test Drupal\Tests\node\Kernel\Views\RevisionUidTest::testRevisionUid. The view does not have a sort order specified, yet the result is passed to assertIdenticalResultset().
We need to programmically Alter the view to add a sort to this test case.
Comment | File | Size | Author |
---|---|---|---|
#5 | 3146016-5.patch | 873 bytes | daffie |
#3 | 3146016-3.patch | 914 bytes | Beakerboy |
Comments
Comment #2
BeakerboyPatch for review
Comment #3
BeakerboyChanged the comment, but the code is the same as #2.
Comment #4
BeakerboyComment #5
daffie CreditAttribution: daffie commentedI think that it is better to add the sorting to the view. The view is only used by this test class and there is no tests on sorting. Adding the extra code to the test class is to me a bit distracting for the person who is trying to understand what the test is testing. Big question is does this solution work for you @Beakerboy?
Different solution, therefore no interdiff file.
Comment #7
Beakerboy#5 has been tested with sqlsrv and Drupal 9.1. It resolves the issue.
Comment #8
alexpottCommitted and pushed 19f12a5935 to 9.1.x and 07f46cc092 to 9.0.x and 32c22ef9d9 to 8.9.x. Thanks!
As a test-only fix backported to 8.9.x
Comment #12
alexpottI committed the wrong patch by mistake.
Committed and pushed 022eff4c37 to 9.1.x and fc261ca518 to 9.0.x and e4972ce5c4 to 8.9.x. Thanks!