Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-5357

ComponentsTestUtil setMagnoliaConfigurationProperties in Static Initializers

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • None
    • None
    • core

    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.

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              Unassigned Unassigned
              mdivilek Milan Divilek
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Checklists

                  Bug DoR
                  Task DoD