46218[FEATURE] Suffix for functional test database
Commit message
Review
-
Code review CR 0
-
Verified V 0
Issues 1
Files 1
Review log 18
-
Tomas Norre Mikkelsen uploaded patch set 1 01/25/16, 10:00
-
Frank Nägler commented on patch set 1 CR -1 01/25/16, 11:22
I will push an updateFunctionalTestCaseBootstrapUtility.php:362this block can be replaced with: $suffix = !empty($originalConfigurationArray['DB']['testDatabaseSuffix']) ? $originalConfigurationArray['DB']['testDatabaseSuffix'] : '_ft'; $this->databaseName = $this->originalDatabaseName . $suffix . $this->identifier; two lines of code instead of ten.FunctionalTestCaseBootstrapUtility.php:382and again, use $suffix from above here -
Frank Nägler uploaded patch set 2 01/25/16, 11:30
-
Frank Nägler voted on patch set 2 CR +1 01/25/16, 11:31
-
Georg Ringer commented on patch set 2 01/25/16, 11:41
pls add an rst -
Tomas Norre Mikkelsen commented on patch set 2 01/25/16, 11:53
But my reason for this is not to namespace, but to get rid of the identifier if suffix is set, so it's uses the same db always. -
Frank Nägler commented on patch set 2 01/25/16, 12:04
ah sorry, know I get it. but then we should use my version and add an extra setting to skip the identifier, if this make sense at all. the setting name testDatabaseSuffix is misleading. What do you think about a setting with the name 'skipTestDatabaseIdentifier'. -
Christian Kuhn commented on patch set 2 CR -1 01/25/16, 12:05
-1 for two reasons: functional tests should not rely on LocalConfiguration settings, parameters are usually given via environment variables. The internal functional test system relies on "one db per test case". If this is destroyed the test cleanup / recreation system will break (there is a truncate / delete db logic that can speed up the tests on consecutive runs). -
Tomas Norre Mikkelsen commented on patch set 2 01/25/16, 12:06
I think the skipTestDatabaseIdentifier is fair, but i still need the info to add the suffix.. But a combination of both will be pretty long and ugly.. skipTestDatabaseIdentifierUseSuffix -
Tomas Norre Mikkelsen commented on patch set 2 01/25/16, 12:33
Christian: With this comment: "The internal functional test system relies on "one db per test case". If this is destroyed the test cleanup / recreation system will break (there is a truncate / delete db logic that can speed up the tests on consecutive runs)." If I understand you correct, you are "against" (sorry didn't have a better word, don't mean it in a negative way) the possibility to have the suffix replacing the identifier? Is this correct understood? -
Christian Kuhn commented on patch set 2 01/25/16, 12:50
added a much longer explanation to all this to the forge issue. -
Tomas Norre Mikkelsen commented on patch set 2 01/25/16, 13:56
Thanks Christian. -
Benni Mack commented on patch set 2 03/06/16, 01:40
I would consider the same - having _ft as default, but be overrideable via getenv() - cool with everybody? -
Christian Kuhn commented on patch set 2 03/31/16, 18:00
Mmmh, I'm still not a really very big fan of the idea to have a parameter setting / forcing the database name. This isn't beneficial for most users, they should just rely on the core abstract class that takes care the setup is sane and doesn't collide with something. But meanwhile we refactored the functional bootstrap a lot, the main stuff is not exposed to setUp() of FunctionalTestCase. So, if you really want to change the DB settings, you're now free to not call parent::setUp() in your functional test, but instead do your own setUp() calling / reconfiguring those parts you want. You will probably end up with copy/paste of the 40 lines of code from the method, but at least it is not easily accessible. Is this enough for you? If so, I'd tend to abandon this patch. -
Frank Nägler voted on patch set 2 CR 0 04/08/16, 12:08
-
Susi Moog commented on patch set 2 01/22/17, 14:19
After the last comment from Christian is this one still needed or can it be closed? -
Tomas Norre Mikkelsen commented on patch set 2 01/23/17, 09:43
We have found a solution internal for this, so if it's not something that would be supported by the core it's not a blocker for us anymore, i just saw it as a nice possibility. -
Christian Kuhn abandoned the change 02/24/17, 13:59
will abandon this now.