Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX Regression from #8009 #8132

Merged

Conversation

dhensby
Copy link
Contributor

@dhensby dhensby commented Jun 4, 2018

fixes #8041

This fixes the typical sort issue with fetching from postgres DBs

I've replaced the $this->assertEquals($list->Count(), $listDuplicate->count()) with predefined numbers because this helps show what's going on to people reading it and also helps catch regressions.

It is expected that if you duplicate both sides of a ManyMany that you'd get 2 relations where you previously had only 1 and so these changed assertions are correct, the (intermittent) test failures reported in #8009 come from the fact that postgres has unreliable default sorting on objects so the first item wasn't always the one we were asserting against.

@dhensby dhensby force-pushed the pulls/3.5/postgres-test-fix branch from bc6589e to 41e601a Compare June 4, 2018 16:09
@robbieaverill robbieaverill merged commit 13ea2f9 into silverstripe:3.5 Jun 5, 2018
@dhensby dhensby deleted the pulls/3.5/postgres-test-fix branch June 5, 2018 15:26
@robbieaverill
Copy link
Contributor

Related 4.0 fix: #8150

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants