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 /apps/files_sharing/tests/Command/CleanupRemoteStoragesTest.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 'apps/files_sharing/tests/Command/CleanupRemoteStoragesTest.php')
-rw-r--r-- | apps/files_sharing/tests/Command/CleanupRemoteStoragesTest.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/files_sharing/tests/Command/CleanupRemoteStoragesTest.php b/apps/files_sharing/tests/Command/CleanupRemoteStoragesTest.php index dd03ffc6668..b163583bf11 100644 --- a/apps/files_sharing/tests/Command/CleanupRemoteStoragesTest.php +++ b/apps/files_sharing/tests/Command/CleanupRemoteStoragesTest.php @@ -142,7 +142,10 @@ class CleanupRemoteStoragesTest extends TestCase { $qb->select('*') ->from('storages') ->where($qb->expr()->eq('numeric_id', $qb->createNamedParameter($numericId))); - $result = $qb->execute()->fetchAll(); + + $qResult = $qb->execute(); + $result = $qResult->fetchAll(); + $qResult->closeCursor(); if (!empty($result)) { return true; } @@ -151,7 +154,10 @@ class CleanupRemoteStoragesTest extends TestCase { $qb->select('*') ->from('filecache') ->where($qb->expr()->eq('storage', $qb->createNamedParameter($numericId))); - $result = $qb->execute()->fetchAll(); + + $qResult = $qb->execute(); + $result = $qResult->fetchAll(); + $qResult->closeCursor(); if (!empty($result)) { return true; } |