BUGFIX Rebuilding test database for postgresql in SearchFormTest and TranslatableSearchFormTest to avoid stale index information in the database (from r103803)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112161 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2010-10-13 04:07:10 +00:00
parent 94158efc45
commit a40d190161
2 changed files with 18 additions and 0 deletions

View File

@ -24,6 +24,15 @@ class SearchFormTest extends FunctionalTest {
),
);
function setUpOnce() {
// HACK Postgres doesn't refresh TSearch indexes when the schema changes after CREATE TABLE
if(is_a(DB::getConn(), 'PostgreSQLDatabase')) {
self::kill_temp_db();
}
parent::setUpOnce();
}
function setUp() {
parent::setUp();

View File

@ -22,6 +22,15 @@ class TranslatableSearchFormTest extends FunctionalTest {
),
);
function setUpOnce() {
// HACK Postgres doesn't refresh TSearch indexes when the schema changes after CREATE TABLE
if(is_a(DB::getConn(), 'PostgreSQLDatabase')) {
self::kill_temp_db();
}
parent::setUpOnce();
}
function setUp() {
parent::setUp();