Stig Rohde Døssing created STORM-2479:
-----------------------------------------
Summary: DRPC tests should not use Utils.getAvailablePort, since
that function is inherently unsafe
Key: STORM-2479
URL: https://issues.apache.org/jira/browse/STORM-2479
Project: Apache Storm
Issue Type: Bug
Reporter: Stig Rohde Døssing
Assignee: Stig Rohde Døssing
Priority: Minor
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.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)