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

Speed up DirectoryWatcherTest using Oracle JVM internal API

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Neutral
    • 5.4.5
    • 5.4.4
    • None
    • None
    • Basel 27
    • 1

    Description

      DirectoryWatcher test is in main/magnolia-resource-loader which currently takes 2 minutes and 20 seconds to build on my machine. This time is spent waiting for file system polling which only happens every 10 seconds. Each test has to wait for these 10 seconds to verify its result.

      In the Oracle JVM the 10 second interval is the default and can be changed down to 2 seconds. This reduces the build time to 53 seconds. A reduction by 87 seconds, 62%.

      Doing it requires a change to DirectoryWatcher itself, to get the modifiers in there for the register call. I've tried changing just the test by using reflection and proxies to squeeze the extra modifier in there but it's just too much work.

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                tmattsson Tobias Mattsson
                tmattsson Tobias Mattsson
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Task DoD

                    Time Tracking

                      Estimated:
                      Original Estimate - Not Specified
                      Not Specified
                      Remaining:
                      Remaining Estimate - 0d
                      0d
                      Logged:
                      Time Spent - 0.25d
                      0.25d