Skip to content

Commit

Permalink
MDL-53481 availability: Fix unit test to not execute the huge query
Browse files Browse the repository at this point in the history
Some DBs have troubles to execute such a huge query as generated in this
test. We do not actually need to execute it. All we need is to make sure
that the parameter placeholders are enumerated correctly. So it is what
this new test does.
  • Loading branch information
mudrd8mz committed Nov 10, 2016
1 parent 93f4f34 commit 445aa47
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions availability/tests/tree_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -728,8 +728,8 @@ public function test_unique_sql_parameter_behaviour() {
shuffle($conditions);
$tree = new tree(tree::get_root_json($conditions));
list($sql, $params) = $tree->get_user_list_sql(false, $info, false);
$result = $DB->get_fieldset_sql($sql, $params);
$this->assertEquals(array($user->id), $result);
// This must not throw exception.
$DB->fix_sql_params($sql, $params);
}

/**
Expand Down

0 comments on commit 445aa47

Please sign in to comment.