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

File Handle leak in info.magnolia.test.junit5.JcrConfiguration.init()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Neutral Neutral
    • None
    • 6.2.16
    • testing
    • None

      The info.magnolia.test.junit5.JcrConfiguration.init() method creates an instance of a FileOutputStream, but doesn't close it. It means that file remains open until the instance is garbage collected. In our case the unit test fails sporadically because when unit test faild to delete temp files on the disk.

      Sorry, I can't provide a test case, because the fault is dependent on race conditions.

      Introduced in MAGNOLIA-8188

      See https://git.magnolia-cms.com/projects/PLATFORM/repos/main/browse/magnolia-core/src/test/java/info/magnolia/test/junit5/JcrConfiguration.java#144

        Acceptance criteria

              Unassigned Unassigned
              azavodnik Andrey Zavodnik
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:

                  Bug DoR
                  Task DoD