Index: trunk/phase3/tests/phpunit/MediaWikiTestCase.php |
— | — | @@ -188,12 +188,19 @@ |
189 | 189 | return substr( $tableName, strlen( $wgDBprefix ) ); |
190 | 190 | } |
191 | 191 | |
| 192 | + static private function isNotUnittest( $table ) { |
| 193 | + return strpos( $table, 'unittest_' ) !== 0; |
| 194 | + } |
| 195 | + |
192 | 196 | protected function listTables() { |
193 | 197 | global $wgDBprefix; |
194 | 198 | |
195 | 199 | $tables = $this->db->listTables( $wgDBprefix, __METHOD__ ); |
196 | 200 | $tables = array_map( array( __CLASS__, 'unprefixTable' ), $tables ); |
197 | 201 | |
| 202 | + // Don't duplicate test tables from the previous fataled run |
| 203 | + $tables = array_filter( $tables, array( __CLASS__, 'isNotUnittest' ) ); |
| 204 | + |
198 | 205 | if ( $this->db->getType() == 'sqlite' ) { |
199 | 206 | $tables = array_flip( $tables ); |
200 | 207 | // these are subtables of searchindex and don't need to be duped/dropped separately |