Re: finding free ports for tests

2015-04-09 Thread Steve Loughran
On 8 Apr 2015, at 20:19, Hari Shreedharan mailto:hshreedha...@cloudera.com>> wrote: One good way to guarantee your tests will work is to have your server bind to an ephemeral port and then query it to find the port it is running on. This ensures that race conditions don’t cause test failures.

Re: finding free ports for tests

2015-04-08 Thread Hari Shreedharan
One good way to guarantee your tests will work is to have your server bind to an ephemeral port and then query it to find the port it is running on. This ensures that race conditions don’t cause test failures. Thanks, Hari On Wed, Apr 8, 2015 at 3:24 AM, Sean Owen wrote: > Utils.startServi

Re: finding free ports for tests

2015-04-08 Thread Sean Owen
Utils.startServiceOnPort? On Wed, Apr 8, 2015 at 6:16 AM, Steve Loughran wrote: > > I'm writing some functional tests for the SPARK-1537 JIRA, Yarn timeline > service integration, for which I need to allocate some free ports. > > I don't want to hard code them in as that can lead to unreliable t

finding free ports for tests

2015-04-08 Thread Steve Loughran
I'm writing some functional tests for the SPARK-1537 JIRA, Yarn timeline service integration, for which I need to allocate some free ports. I don't want to hard code them in as that can lead to unreliable tests, especially on Jenkins. Before I implement the logic myself -Is there a utility cl