Details
-
Bug
-
Resolution: Won't Do
-
Major
-
None
-
None
Description
info.magnolia.test.ComponentsTestUtil use Static Initializers for setMagnoliaConfigurationProperties into SystemProperty. So they are set when the class is initialized, but the problem is there is no clean way how to set them if they were clean. Only how they can be set again is call ComponentsTestUtil.clear() method. What is really ugly to setMagnoliaConfigurationProperties on clear...
This cause problem when maven do the test during build.
Example of problem:
Lets have info.magnolia.ui.form.field.transformer.composite.CompositeTransformerTest and info.magnolia.ui.form.field.factory.BasicUploadFieldFactoryTest.
Run CompositeTransformerTest as first. CompositeTransformerTest extends RepositoryTestCase. During this test is ComponentsTestUtil initialized so setMagnoliaConfigurationProperties are sets and after test tearDown is called. TearDown do SystemProperty.clear(). So MagnoliaConfigurationProperties are not set in SystemProperty for next tests.
Run BasicUploadFieldFactoryTest MagnoliaConfigurationProperties are not set and also ComponentsTestUtil was already initialized so Static Initializers is not call. This cause fail of BasicUploadFieldFactoryTest.