mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
efd818f96f
commit
a7fae06faa
@ -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();
|
||||
|
||||
|
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user