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.
SearchCommentTest triggers random test failures.
Comment | File | Size | Author |
---|---|---|---|
#11 | 1655422-11.drupal8.searchcommenttest.patch | 792 bytes | alexpott |
#8 | UnionCountQuerryTestSmall.jpg | 201.5 KB | hosef |
#2 | interdiff.txt | 1014 bytes | chx |
#2 | 1655422_2.patch | 5.19 KB | chx |
#1 | drupal8.search-comment-test.1.patch | 4.99 KB | sun |
Comments
Comment #1
sunFailures actually seem to be in functional code. Alternatively, in bogus test expectations.
In any case, attached patch should expose what's actually going on.
Comment #2
chx CreditAttribution: chx commentedWell if we want to see what's going on then not using variable method calls would be good while at it.
Comment #3
Dries CreditAttribution: Dries commentedCommitted to 8.x.
Moving to 7.x.
Comment #4
webchickComment #5
David_Rothstein CreditAttribution: David_Rothstein commentedDoesn't sound like that patch was intended to be the final word here, was it? Just a cleanup patch to improve the assertion messages and help see what was going on...
Also not sure these random test failures exist in Drupal 7 at all (although they could).
Comment #6
sunRighto. The committed patch only exposes what's going wrong when the random test failure happens again.
Comment #7
guy_schneerson CreditAttribution: guy_schneerson commentedWe just had this issue on our first core patch and was a confusing experience, not saying it is a major issue but should definitely be fixed ASAP
the issue http://drupal.org/node/1662956 failed testing first time, second time passed.
Comment #8
hosef CreditAttribution: hosef commentedI believe this issue just came up on #1145080: SelectQuery::countQuery() incompatible with UNION queries. I took a screenshot of the fail messages from the test bot before retesting incase they would be helpful.
Comment #9
catchComment #10
BerdirI tried to look into this, but I have no clue how to figure out what's going on here. Can't see anything wrong either in the tests nor in the code, nothing that could cause this. It looks like the comment is not indexed, despite he should. Something weird going on with roles maybe?
Note that the line numbers of the screenshot don't match anymore.
Comment #11
alexpottGot it!
The offending line of code is in comment_node_update_index()... specifically the assumption here that rid is numeric and anonymous will be 0 and authenticated 1
Obviously with the new machine name roles and the fact this test creates a role with a random rid is responsible for this test's random behaviour!
Comment #12
chx CreditAttribution: chx commentedVery very awesome. So if it created a role name which started with aa or something then it failed, not many strings are below 'authenticated' so that's why it was so rare.
Comment #13
webchickI'm happy to commit this to stop the madness (on my way down to the sprint shortly), but doesn't this also mean we need test coverage for comment_node_update_index()? There's no reason we should have been getting random test failures; the code there is simply wrong, no?
Comment #14
chx CreditAttribution: chx commentedThis is the test for comment_node_update_index :D
Comment #15
webchickOh, ok. :)
Committed and pushed to 8.x. Rock!
Comment #17
sun