hudson.model.Resource.isCollidingWith() is broken

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major
    • Component/s: other
    • None
    • Environment:
      Platform: All, OS: Windows XP

      I think there is a bug or two in the resource code.

      Resource a = new Resource("a name");

      ResourceList x = new ResourceList();
      ResourceList y = new ResourceList();

      x.w(a);
      y.r(a);

      assertTrue("Read-Write conflict should colide, x.isConflictingWith); // this
      will fail

      y = new ResourceList();
      y.w(a);

      assertTrue("Write-Write conflict (when only 1 concurrent writer is permitted)
      should colide", x.isConflictingWith); // this will fail

      There are others!

      I have checked in a JUnit test with some of the failure modes that I think there
      are.

      I tried some simple quick fixes to the Resource code but could not get it to
      work within the time I can spend on it.

      -Stephen

            Assignee:
            Unassigned
            Reporter:
            Stephen Connolly
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: