Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-4252

Detect/Fail tests when they leak RAM in static fields

    Details

    • Type: Test
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0, 6.0
    • Component/s: general/test
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      We run our junit tests without firing up a JVM each time.

      But some tests initialize lots of stuff in @BeforeClass and don't properly null it out in an @AfterClass, which can cause a subsequent test in the same JVM to OOM, which is difficult to debug.

      Inspiration for this was me committing Mike's cool TestPostingsFormat, which forgot to do this: then we were seeing OOMs in several jenkins runs.

      We should try to detect these leaks in LuceneTestCase with RAMUsageEstimator and fail the test.

        Attachments

        1. LUCENE-4252.patch
          2 kB
          Robert Muir
        2. LUCENE-4252.patch
          2 kB
          Robert Muir
        3. sfi.patch
          7 kB
          Dawid Weiss

          Activity

            People

            • Assignee:
              dweiss Dawid Weiss
              Reporter:
              rcmuir Robert Muir
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: