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
FieldGroupRowsWebTest fails currently with PostgreSQL as database backend.
The test fails because the order of results is not guaranteed.
Proposed resolution
- Fix order by adding the delta for the field to the view sort.
- Removes created from the view sort.
Remaining tasks
Patch needs review.
User interface changes
None.
API changes
None.
Beta phase evaluation
Issue category | PostgreSQL Bug |
---|---|
Issue priority | Major |
Prioritized changes | PostgreSQL fix that changes test data only. |
Disruption | None |
Comment | File | Size | Author |
---|---|---|---|
#7 | drupal-2480959-fix-test-ungroup-rows-7.patch | 1.13 KB | mradcliffe |
#2 | drupal-2480959-fix-test-ungroup-rows-2.patch | 943 bytes | mradcliffe |
Comments
Comment #1
dawehnerWell, in that case I'd always suggest to add the most minimal order, which is NID almost ever ...
Comment #2
mradcliffeComment #3
mradcliffePasses SQLite on my local environment.
Comment #4
dawehnerIt seems to be for me that the easiest way to fix that would be to replace the created one with sorting by
field_views_testing_group_
?Comment #5
jaredsmith CreditAttribution: jaredsmith at Bluehost commentedI can confirm that this patch indeed fixes the failing test in Drupal\views\Tests\Handler\FieldGroupRowsWebTest. I've also reviewed the patch manually, and while I don't pretend to understand everything, it looks quite straightforward. Marking as RTBC.
Before the patch:
Drupal\views\Tests\Handler\FieldGroupRowsWebTest 9 passes 1 fails
After the patch:
Drupal\views\Tests\Handler\FieldGroupRowsWebTest 10 passes
Comment #6
webchickDoesn't look like #4 has been addressed.
Comment #7
mradcliffeI wasn't able to generate an interdiff with this patch. Since this changed the sort, we need to run through tests again.
Comment #8
mradcliffeI was running views test group thru drupalci, but drupalci just stopped halfway. The two tests passed though.
Drupal\views\Tests\Handler\FieldGroupRowsTest 6 passes
Drupal\views\Tests\Handler\FieldGroupRowsWebTest 10 passes
Comment #9
jaredsmith CreditAttribution: jaredsmith at Bluehost commentedI have reviewed the code in the patch again, as well as tested it again using the new DrupalCI infrastructure.
Before the patch:
Drupal\views\Tests\Handler\FieldGroupRowsWebTest 9 passes 1 fails
After the patch:
Drupal\views\Tests\Handler\FieldGroupRowsWebTest 10 passes
Additionally, it causes no other regressions in the views test suite. As such, I'm setting this back to RTBC.
Comment #10
webchickCommitted and pushed to 8.0.x. Thanks!