Browse Source

Trying to fix flaky test on postgres

Jose Lorenzo Rodriguez 11 years ago
parent
commit
0d620a7731
1 changed files with 6 additions and 1 deletions
  1. 6 1
      tests/TestCase/ORM/QueryRegressionTest.php

+ 6 - 1
tests/TestCase/ORM/QueryRegressionTest.php

@@ -234,7 +234,12 @@ class QueryRegressionTest extends TestCase {
 				'Highlights' => ['associated' => ['_joinData' => ['associated' => ['Authors']], 'Authors']]
 			]
 		]);
-		$entity = $articles->get(2, ['contain' => ['SpecialTags.Authors', 'Highlights.Authors']]);
+		$entity = $articles->get(2, [
+			'contain' => [
+				'SpecialTags.Authors' => ['sort' => ['Authors.id']],
+				'Highlights.Authors' => ['sort' => ['Authors.id']]
+			]
+		]);
 		$this->assertEquals('mariano', end($entity->special_tags)->author->name);
 		$this->assertEquals('mark', end($entity->highlights)->author->name);
 	}