diff options
author | Joas Schilling <coding@schilljs.com> | 2020-11-05 12:50:53 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-11-09 14:28:17 +0300 |
commit | 8027dcbc6f6b1653f5ebcf04b1862ac1e1f51d32 (patch) | |
tree | 1bf182f477bfbead7b75ae14a8cd0fce5bb38ada /apps/files_external/tests | |
parent | 72545ffd07a07f142c9c18b3e4afc9ae1b5c8da2 (diff) |
Don't leave cursors open when tests fail
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/files_external/tests')
-rw-r--r-- | apps/files_external/tests/Service/StoragesServiceTest.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/files_external/tests/Service/StoragesServiceTest.php b/apps/files_external/tests/Service/StoragesServiceTest.php index 5f10a9b9498..b1118a57140 100644 --- a/apps/files_external/tests/Service/StoragesServiceTest.php +++ b/apps/files_external/tests/Service/StoragesServiceTest.php @@ -334,7 +334,10 @@ abstract class StoragesServiceTest extends \Test\TestCase { $storageCheckQuery = $qb->select('*') ->from('storages') ->where($qb->expr()->eq('numeric_id', $qb->expr()->literal($numericId))); - $storages = $storageCheckQuery->execute()->fetchAll(); + + $result = $storageCheckQuery->execute(); + $storages = $result->fetchAll(); + $result->closeCursor(); $this->assertCount($expectedCountAfterDeletion, $storages, "expected $expectedCountAfterDeletion storages, got " . json_encode($storages)); } |