From 2441c2d5e435ace5c97927fcdca079a00ecca4e0 Mon Sep 17 00:00:00 2001 From: X! Date: Fri, 31 Dec 2010 21:51:21 +0000 Subject: [PATCH] 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. --- tests/phpunit/MediaWikiTestCase.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 ) { } } -- 2.20.1