From: X! Date: Fri, 31 Dec 2010 21:51:21 +0000 (+0000) Subject: For some reason tableExists() is being unreliable, which is resulting in tables not... X-Git-Tag: 1.31.0-rc.0~32944 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_aide%28?a=commitdiff_plain;h=2441c2d5e435ace5c97927fcdca079a00ecca4e0;p=lhc%2Fweb%2Fwiklou.git For some reason tableExists() is being unreliable, which is resulting in tables not being dropped that _should_ be dropped. Drop them anyway and ignore the errors. --- diff --git a/tests/phpunit/MediaWikiTestCase.php b/tests/phpunit/MediaWikiTestCase.php index 8998e2c18e..8e30ffffec 100644 --- a/tests/phpunit/MediaWikiTestCase.php +++ b/tests/phpunit/MediaWikiTestCase.php @@ -144,9 +144,10 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase { } foreach ( $tables as $table ) { - if( $this->db->tableExists( "`$table`" ) ) { + try { $sql = $this->db->getType() == 'oracle' ? "DROP TABLE $table DROP CONSTRAINTS" : "DROP TABLE `$table`"; $this->db->query( $sql, __METHOD__ ); + } catch( Exception $e ) { } }