This issue is part of #2157455: [Meta] Make Drupal 8 work with PostgreSQL or remove support from core before release.

Problem/Motivation

Some CommentRestExport tests fail for PostgreSQL, because the view (view.views.rest_comment_rest.yml) used in test requests created comments with no order.

Proposed resolution

Add order clause to view to make PostgreSQL pass.

User interface changes

None

API changes

None

Original report by @bzrudi71

Currently there is one or more fail or exception in the comment test group identified by the new docker based testbot that need to be fixed to make PostgreSQL finally passing all tests. Command in use:

sudo DCI_DBTYPE='pgsql' \
DCI_DBVER='9.1' \
DCI_PHPVERSION='5.5' \
DCI_CONCURRENCY='4' \
DCI_TESTGROUPS='comment' \
DCI_DRUPALBRANCH='8.0.x' \
DCI_VERBOSE='true' \
DCI_UPDATEREPO='true' \
./containers/web/run.sh

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue category Bug because of broken tests
Issue priority Major because of broken test environment
Disruption None disruptive for core/contributed and custom modules/themes because it is a bugfix only

Comments

bzrudi71’s picture

Here are the results attached. We have one failing test (exception) in CommentBookTest, but that one is annoying, because I thought this one to was fixed already ;-)

---- Drupal\comment\Tests\CommentBookTest ----


Status    Group      Filename          Line Function                            
--------------------------------------------------------------------------------
Pass      Other      CommentBookTest.p   28 Drupal\comment\Tests\CommentBookTes
    Enabled modules: book, comment
Exception Uncaught e SqlContentEntityS  913 Drupal\Core\Entity\Sql\SqlContentEn
    Drupal\Core\Entity\EntityStorageException: mimic_implicit_commit is already
    in use. in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line
    913 of
    /var/www/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).
    Drupal\Core\Entity\Sql\SqlContentEntityStorage->save(Object)
    Drupal\Core\Entity\Entity->save()
    Drupal\comment\Tests\CommentBookTest->testBookCommentPrint()
    Drupal\simpletest\TestBase->run()
    simpletest_script_run_one_test('5', 'Drupal\comment\Tests\CommentBookTest')
bzrudi71’s picture

StatusFileSize
new654.03 KB

Updated test results now that #2403485: Complete conversion of comment form validation to entity validation is in. No more exceptions, just two fails in new CommentRestExportTest.

bzrudi71’s picture

Status: Active » Needs review
StatusFileSize
new1016 bytes

Seems that view.views.rest_comment_rest.yml view is missing any order by logic for the retrieval of comments and thus fails for PostgreSQL. Patch applied ads order by cid and passes PostgreSQL bot now.
Let's see if MySQL likes the patch also...

bzrudi71’s picture

Component: postgresql db driver » comment.module
Category: Task » Bug report
Priority: Normal » Major
Issue summary: View changes

Added issue summary update and beta evaluation...

andypost’s picture

Status: Needs review » Reviewed & tested by the community

Great! Manually tested, it works!
Also this makes this test return predictable order of results on other storage engines

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 6eb18e4 and pushed to 8.0.x. Thanks!

Thanks for adding the beta evaluation.

  • alexpott committed 6eb18e4 on 8.0.x
    Issue #2356967 by bzrudi71: PostgreSQL: Fix tests in comment test group
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.