Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-1080

hudson.model.Resource.isCollidingWith() is broken

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • other
    • None
    • 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

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

              Created:
              Updated:
              Resolved: