Uploaded image for project: 'Apache Storm'
  1. Apache Storm
  2. STORM-2479

DRPC tests should not use Utils.getAvailablePort, since that function is inherently unsafe

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.0
    • Component/s: None
    • Labels:
      None

      Description

      The DRPC tests should avoid using Utils.getAvailablePort. That method for getting an unused port is prone to race conditions, since there is no guarantee that a port that is found using getAvailablePort is still available when the returned port is actually used to create a socket. There is also no guarantee that the same port is not returned to multiple threads.

      The tests should instead pass a random port to the servers underlying DRPCServer, and ask those servers which ports they're running on when they've started.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Srdo Stig Rohde Døssing
                Reporter:
                Srdo Stig Rohde Døssing
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1.5h
                  1.5h