Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Problem/Motivation
FieldGroupRowsTest fails currently with PostgreSQL as database backend. This is because the test expects the values in a given order but that is not guaranteed because the all have the same timestamp. As this happens over and over again let's change the test.
Proposed resolution
Change test to just check that all expected values are rendered but in no given order.
Remaining tasks
Review patch.
User interface changes
None.
API changes
None.
Comment | File | Size | Author |
---|---|---|---|
#8 | drupal-2480799-fix-field-group-rows-8.patch | 1.11 KB | mradcliffe |
#5 | drupal-2480799-fix-field-group-rows-5.patch | 919 bytes | mradcliffe |
field_group_rows_test_fix.patch | 1.19 KB | bzrudi71 | |
Comments
Comment #1
bzrudi71 CreditAttribution: bzrudi71 commentedNot sure if this is the way to go but at least a start, comments welcome :)
Comment #2
dawehnerCan we short by NID and be done? Its more simple anyway to sort by that.
Comment #3
dawehnerCan we short by NID and be done? Its more simple anyway to sort by that.
Comment #4
bzrudi71 CreditAttribution: bzrudi71 commentedUnfortunately I guess not. If I don't get it totally wrong we are working with just a single NID ;)
Comment #5
mradcliffeThis patch adds delta for that field in the sort for test_group_rows.
Let's see if mysql has anything to say about it.
@jaredsmith will run on new testbot postgresqlComment #6
mradcliffePasses SQLite on my local environment.
Comment #7
dawehnerRemoving created seems to be something we should really better do here.
Comment #8
mradcliffeI wasn't able to generate an interdiff for this patch with interdiff. Because the sort changed, we need to run tests again.
Comment #9
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 #10
mradcliffeRan full Views group test and did not have any regressions. The ViewsDisplayTest in the first result is a random test fail as demonstrated by the subsequent run of that test class.
Comment #11
mradcliffe@jaredsmith is running without the patch as well.
Comment #12
erik.erskine CreditAttribution: erik.erskine as a volunteer commentedTried #8 a few times on a local environment - FieldGroupRowsTest & FieldGroupRowsWebTest all pass.
Have also tried a full run all the views tests - no new failures introduced on PostgreSQL and all the tests passed on MySQL and SQLite.
Comment #13
jaredsmith CreditAttribution: jaredsmith at Bluehost commentedI've reviewed this code, and run this patch through the new DrupalCI test infrastructure. It fixes the failing test, and does not cause any additional test failures in the Views testgroup.
Before the patch:
Drupal\views\Tests\Handler\FieldGroupRowsTest 4 passes 2 fails
After the patch:
Drupal\views\Tests\Handler\FieldGroupRowsTest 6 passes
I believe this patch is ready to be committed, so I'm setting it to RTBC.
Comment #15
webchickAwesome work, all! I was a bit confused on why we were using delta here instead of nid, but #4 points out that this is because the test is only working on one nid.
Committed and pushed to 8.0.x. Thanks!
Comment #16
webchick