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

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@103803 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-04-30 02:00:01 +00:00 committed by Sam Minnee
parent efd818f96f
commit a7fae06faa
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();