Database errors should cause an exception, not return false,
unless the test case, or the code under test, explicitely calls
ignoreErrors(true). The DB object should be reset to fail fast
and safe for every test.
Change-Id: Ifc2a720ec46a1843d9ffb1488c54743a0099ef9d
}
}
- // Clean up open transactions
if ( $this->needsDB() && $this->db ) {
+ // Clean up open transactions
while( $this->db->trxLevel() > 0 ) {
$this->db->rollback();
}
+
+ // don't ignore DB errors
+ $this->db->ignoreErrors( false );
}
wfProfileOut( __METHOD__ );
}
}
- // Clean up open transactions
if ( $this->needsDB() && $this->db ) {
+ // Clean up open transactions
while( $this->db->trxLevel() > 0 ) {
$this->db->rollback();
}
+
+ // don't ignore DB errors
+ $this->db->ignoreErrors( false );
}
// Restore mw globals