This issue is part of #2454513: [meta] Make Drupal 8 work with SQLite.

This test case from the user module is currently failing on SQLite:

Drupal\user\Tests\Views\RelationshipRepresentativeNodeTest
CommentFileSizeAuthor
#8 2454751-8.patch903 bytesamateescu
#3 2454751.patch941 bytesamateescu

Comments

amateescu’s picture

Issue summary: View changes

Drupal\user\Tests\Views\HandlerFieldRoleTest will be fixed by #2454625: SQLite: Fix SQLITE_SCHEMA errors in web tests, removing it from the list.

amateescu’s picture

Title: SQLite: Fix sub-system tests in the user module » SQLite: Fix user\Tests\Views\RelationshipRepresentativeNodeTest
Issue summary: View changes

Drupal\user\Tests\UserAdminTest was failing before but it passes with current HEAD, I guess a PostgreSQL issue fixed it.

We're down to 1 failing test here so I'm re-purposing the issue just for that.

amateescu’s picture

Component: sqlite db driver » views.module
Status: Active » Needs review
Issue tags: +D8 Accelerate, +sqlite
StatusFileSize
new941 bytes

Discussed with @dawehner and apparently we're hitting the internal sort implementation of db engines for an equal number (the user created timestamp), so we can just update them to be different.

Test run before:

------------

Drupal\user\Tests\Views\RelationshipRepresentativeNodeTest     2 passes   1 fails                  2 messages

Test run duration: 7 sec

Test run after:

Test summary
------------

Drupal\user\Tests\Views\RelationshipRepresentativeNodeTest     3 passes                            2 messages

Test run duration: 7 sec
dawehner’s picture

Status: Needs review » Reviewed & tested by the community

That totally makes sense! We worked together but the fix is just the way how to fix it.

xjm’s picture

tstoeckler’s picture

Does it make sense to instead add a second filter on uid? I guess this is just a test view so it doesn't matter much but IIRC we've hit this before with real views e.g. when you create a bunch of nodes programmatically that then end up having the same timestamp that the sort order is then undefined.

webchick’s picture

Status: Reviewed & tested by the community » Needs review

Good question.

amateescu’s picture

StatusFileSize
new903 bytes

@dawehner also suggested that while we were discussing this issue, and it makes sense to just not use the default sort added by the view but replace it with one on uid instead.

Status: Needs review » Needs work

The last submitted patch, 8: 2454751-8.patch, failed testing.

Status: Needs work » Needs review

isntall queued 8: 2454751-8.patch for re-testing.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Let's get it RTBC again.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.0.x. Thanks!

  • webchick committed d06839c on 8.0.x
    Issue #2454751 by amateescu, dawehner, tstoeckler: SQLite: Fix user\...

Status: Fixed » Closed (fixed)

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