Permalink
Browse files

If running unit tests against Akiban, do not run tests related to tem…

…porary tables since Akiban does not support those.
  • Loading branch information...
1 parent 3d4668f commit 200ebd87769379e156db46afab2122e555a75610 @posulliv committed Aug 15, 2012
@@ -35,6 +35,9 @@ public function tearDown()
public function testDropTemporaryTableNotAutoCommitTransaction()
{
$platform = $this->_conn->getDatabasePlatform();
+ if ($platform->getName() == "akibansrv") {
+ $this->markTestSkipped('Akiban does not support temporary tables');
+ }
$columnDefinitions = array("id" => array("type" => Type::getType("integer"), "notnull" => true));
$tempTable = $platform->getTemporaryTableName("temporary");
@@ -68,6 +71,9 @@ public function testDropTemporaryTableNotAutoCommitTransaction()
public function testCreateTemporaryTableNotAutoCommitTransaction()
{
$platform = $this->_conn->getDatabasePlatform();
+ if ($platform->getName() == "akibansrv") {
+ $this->markTestSkipped('Akiban does not support temporary tables');
+ }
$columnDefinitions = array("id" => array("type" => Type::getType("integer"), "notnull" => true));
$tempTable = $platform->getTemporaryTableName("temporary");
@@ -99,4 +105,4 @@ public function testCreateTemporaryTableNotAutoCommitTransaction()
$rows = $this->_conn->fetchAll('SELECT * FROM nontemporary');
$this->assertEquals(array(), $rows, "In an event of an error this result has one row, because of an implicit commit.");
}
-}
+}
@@ -122,7 +122,8 @@ public function testDelete()
$this->assertEquals(1, count($this->_conn->fetchAll('SELECT * FROM write_table')));
$this->assertEquals(1, $this->_conn->delete('write_table', array('test_int' => 1)));
- $this->assertEquals(0, count($this->_conn->fetchAll('SELECT * FROM write_table')));
+ $result = $this->_conn->fetchAll('SELECT * FROM write_table');
+ $this->assertEquals(0, ($result == false) ? 0 : count($result));
}
public function testUpdate()

0 comments on commit 200ebd8

Please sign in to comment.