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

SyntaxConformanceTest::testSqlOperators - Fix failure on MySQL 8 #17262

Merged
merged 1 commit into from
May 8, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion tests/phpunit/api/v3/SyntaxConformanceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,7 @@ public static function toBeSkipped_getSqlOperators() {
];

// The testSqlOperators fails sporadically on MySQL 5.5, which is deprecated anyway.
// Re:^^^ => the failure was probably correct behavior, and test is now fixed, but yeah 5.5 is deprecated, and don't care enough to verify.
// Test data providers should be able to run in pre-boot environment, so we connect directly to SQL server.
require_once 'DB.php';
$db = DB::connect(CIVICRM_DSN);
Expand Down Expand Up @@ -1104,7 +1105,7 @@ public function testSqlOperators($entityName) {
}
$totalEntities = 3;
}
$entities = $this->callAPISuccess($entityName, 'get', ['options' => ['limit' => 0]]);
$entities = $this->callAPISuccess($entityName, 'get', ['options' => ['limit' => 0, 'sort' => 'id']]);
$entities = array_keys($entities['values']);
$this->assertGreaterThan(2, $totalEntities);
$this->callAPISuccess($entityName, 'getsingle', ['id' => ['IN' => [$entities[0]]]]);
Expand Down