Lucene - Core
  1. Lucene - Core
  2. LUCENE-3452

The native FS lock used in test-framework's o.a.l.util.LuceneJUnitResultFormatter prohibits testing on a multi-user system

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 3.4, 4.0-ALPHA
    • Fix Version/s: 3.5, 4.0-ALPHA
    • Component/s: general/test
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      LuceneJUnitResultFormatter uses a lock to buffer test suites' output, so that when run in parallel, they don't interrupt each other when they are displayed on the console.

      The current implementation uses a fixed directory (lucene_junit_lock/ in java.io.tmpdir (by default /tmp/ on Unix/Linux systems) as the location of this lock. This functionality was introduced on SOLR-1835.

      As Shawn Heisey reported on SOLR-2739, some tests fail when run as root, but succeed when run as a non-root user.

      On #lucene IRC today, Shawn wrote:

      (2:06:07 PM) elyograg: Now that I know I can't run the tests as root, I have discovered /tmp/lucene_junit_lock. Once you run the tests as user A, you cannot run them again as user B until that directory is deleted, and only root or the original user can do so.

        Activity

        Steve Rowe created issue -
        Steve Rowe made changes -
        Field Original Value New Value
        Description {{LuceneJUnitResultFormatter}} uses a lock to buffer test suites' output, so that when run in parallel, they don't interrupt each other when they are displayed on the console.

        The current implementation uses a fixed directory ({{lucene_junit_lock/}} in {{java.io.tmpdir}} (by default {{/tmp/}} on Unix/Linux systems) as the location of this lock. This functionality was introduced on SOLR-1835.

        As Shawn Heisey reported on SOLR-2739, some tests fail when run as root, but succeed when run as a non-root user.

        On #lucene IRC today, Shawn wrote:
        {noformat}
        (2:06:07 PM) elyograg: Now that I know I can't run the tests as root, I have discovered /tmp/lucene_junit_lock. Once you run the tests as user A, you cannot run them again as user B until that directory is deleted, and only root or the original user can do so.
        {noformat}
        {{LuceneJUnitResultFormatter}} uses a lock to buffer test suites' output, so that when run in parallel, they don't interrupt each other when they are displayed on the console.

        The current implementation uses a fixed directory ({{lucene_junit_lock/}} in {{java.io.tmpdir}} (by default {{/tmp/}} on Unix/Linux systems) as the location of this lock. This functionality was introduced on SOLR-1835.

        As Shawn Heisey reported on SOLR-2739, some tests fail when run as root, but succeed when run as a non-root user.

        On #lucene IRC today, Shawn wrote:
        {quote}
        (2:06:07 PM) elyograg: Now that I know I can't run the tests as root, I have discovered /tmp/lucene_junit_lock. Once you run the tests as user A, you cannot run them again as user B until that directory is deleted, and only root or the original user can do so.
        {quote}
        Robert Muir made changes -
        Attachment LUCENE-3452.patch [ 12496324 ]
        Robert Muir made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 3.5 [ 12317877 ]
        Fix Version/s 4.0 [ 12314025 ]
        Resolution Fixed [ 1 ]
        Uwe Schindler made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Robert Muir made changes -
        Resolution Fixed [ 1 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Assignee Robert Muir [ rcmuir ]
        Robert Muir made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Uwe Schindler made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Robert Muir
            Reporter:
            Steve Rowe
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development