Lucene - Core
  1. Lucene - Core
  2. LUCENE-3152

MockDirectoryWrapper should wrap the lockfactory

    Details

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

      Description

      After applying the patch from LUCENE-3147, I added a line to make the test fail if it cannot remove its temporary directory.

      I ran 'ant test' on linux 50 times, and it passed all 50 times.
      But on windows, it failed often because of write.lock... this is because of unclosed writers in the test.

      MockDirectoryWrapper is currently unaware of this write.lock, I think it should wrap the lockfactory so that .close() will fail if there are any outstanding locks.
      Then hopefully these tests would fail on linux too.

        Issue Links

          Activity

          Hide
          Robert Muir added a comment -

          attached is a patch... all the windows-only problems i found with LUCENE-3147 now fail on linux (and are corrected in the patch)

          Show
          Robert Muir added a comment - attached is a patch... all the windows-only problems i found with LUCENE-3147 now fail on linux (and are corrected in the patch)
          Hide
          Michael McCandless added a comment -

          Patch looks great! Nice to have MDW catch un-released locks too

          Show
          Michael McCandless added a comment - Patch looks great! Nice to have MDW catch un-released locks too
          Hide
          Robert Muir added a comment -

          ok, i committed to our branch... i'll keep testing with windows but I think between the two issues we have now fixed all the bugs in MockDirectoryWrapper so it consistently "acts like windows".

          Show
          Robert Muir added a comment - ok, i committed to our branch... i'll keep testing with windows but I think between the two issues we have now fixed all the bugs in MockDirectoryWrapper so it consistently "acts like windows".
          Hide
          Shai Erera added a comment -

          This is great ! I think this one can be committed. I ran tests on my Windows machine and all passed.

          Show
          Shai Erera added a comment - This is great ! I think this one can be committed. I ran tests on my Windows machine and all passed.
          Hide
          Shai Erera added a comment -

          Robert, can we close this now that LUCENE-3147 is closed?

          Show
          Shai Erera added a comment - Robert, can we close this now that LUCENE-3147 is closed?
          Hide
          Robert Muir added a comment -

          oops i meant to close this

          Show
          Robert Muir added a comment - oops i meant to close this
          Hide
          Robert Muir added a comment -

          bulk close for 3.3

          Show
          Robert Muir added a comment - bulk close for 3.3

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development