Skip to content

Commit

Permalink
close cursor before skipping the tests
Browse files Browse the repository at this point in the history
to avoid SQL Server to throw an error "Connection is busy with results for another command"
  • Loading branch information
antograssiot committed Jan 29, 2015
1 parent 86025b3 commit 9dbbea0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/TestCase/Database/QueryTest.php
Expand Up @@ -3144,10 +3144,10 @@ public function testUnbufferedQuery()
->bufferResults(false)
->execute();

$this->skipIf(
!method_exists($result, 'bufferResults'),
'This driver does not support unbuffered queries'
);
if (!method_exists($result, 'bufferResults')) {
$result->closeCursor();
$this->skipIf(true, 'This driver does not support unbuffered queries');
}

$this->assertCount(0, $result);
$list = $result->fetchAll('assoc');
Expand Down

0 comments on commit 9dbbea0

Please sign in to comment.