diff options
author | Joas Schilling <coding@schilljs.com> | 2020-11-05 10:50:53 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-11-09 12:28:17 +0100 |
commit | 8027dcbc6f6b1653f5ebcf04b1862ac1e1f51d32 (patch) | |
tree | 1bf182f477bfbead7b75ae14a8cd0fce5bb38ada /tests/lib/Files/Cache/QuerySearchHelperTest.php | |
parent | 72545ffd07a07f142c9c18b3e4afc9ae1b5c8da2 (diff) | |
download | nextcloud-server-8027dcbc6f6b1653f5ebcf04b1862ac1e1f51d32.tar.gz nextcloud-server-8027dcbc6f6b1653f5ebcf04b1862ac1e1f51d32.zip |
Don't leave cursors open when tests fail
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests/lib/Files/Cache/QuerySearchHelperTest.php')
-rw-r--r-- | tests/lib/Files/Cache/QuerySearchHelperTest.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/lib/Files/Cache/QuerySearchHelperTest.php b/tests/lib/Files/Cache/QuerySearchHelperTest.php index 8f97e0158fe..8344460f757 100644 --- a/tests/lib/Files/Cache/QuerySearchHelperTest.php +++ b/tests/lib/Files/Cache/QuerySearchHelperTest.php @@ -136,7 +136,12 @@ class QuerySearchHelperTest extends TestCase { private function search(ISearchOperator $operator) { $dbOperator = $this->querySearchHelper->searchOperatorToDBExpr($this->builder, $operator); $this->builder->andWhere($dbOperator); - return $this->builder->execute()->fetchAll(\PDO::FETCH_COLUMN); + + $result = $this->builder->execute(); + $rows = $result->fetchAll(\PDO::FETCH_COLUMN); + $result->closeCursor(); + + return $rows; } public function comparisonProvider() { |