r79372 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79371‎ | r79372 | r79373 >
Date:21:05, 31 December 2010
Author:soxred93
Status:ok
Tags:
Comment:
Only destroy DB if it needs it
Modified paths:
  • /trunk/phase3/tests/phpunit/MediaWikiTestCase.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/MediaWikiTestCase.php
@@ -49,7 +49,9 @@
5050 }
5151
5252 function __destruct() {
53 - $this->destroyDB();
 53+ if( $this->needsDB() ) {
 54+ $this->destroyDB();
 55+ }
5456 }
5557
5658 function needsDB() {
@@ -121,7 +123,7 @@
122124 //return;
123125 //Temporary tables seem to be broken ATM, delete anyway
124126 }
125 -
 127+
126128 if( $this->db->getType() == 'oracle' ) {
127129 $tables = $this->db->listTables( 'ut_', __METHOD__ );
128130 }

Status & tagging log