mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Bannier <benjamin.bann...@mesosphere.io>
Subject Re: Review Request 53949: Added test helper to obtain unused port.
Date Tue, 22 Nov 2016 16:00:59 GMT


> On Nov. 22, 2016, 2:44 p.m., haosdent huang wrote:
> > src/tests/utils.cpp, lines 96-97
> > <https://reviews.apache.org/r/53949/diff/3/?file=1568083#file1568083line96>
> >
> >     Should we have a maximum failure limit here?
> >     
> >     Another way to get a free port is to bind the socket to `0` and get a random
port. Then close the socket and return that port to the caller.

I like the suggestion of binding to port `0` as this allows us to avoid calling ourself recursively.
Adjusted code accordingly.


- Benjamin


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/53949/#review156567
-----------------------------------------------------------


On Nov. 22, 2016, 4:49 p.m., Benjamin Bannier wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53949/
> -----------------------------------------------------------
> 
> (Updated Nov. 22, 2016, 4:49 p.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov and haosdent huang.
> 
> 
> Bugs: MESOS-6618
>     https://issues.apache.org/jira/browse/MESOS-6618
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added test helper to obtain unused port.
> 
> 
> Diffs
> -----
> 
>   src/tests/utils.hpp 140ebaaae43b03568ec49891635f0660cdfb4c85 
>   src/tests/utils.cpp eb36616f68d81d33d4bd04a7f23295e8c7558fc8 
> 
> Diff: https://reviews.apache.org/r/53949/diff/
> 
> 
> Testing
> -------
> 
> Tested as part of https://reviews.apache.org/r/53950/.
> 
> 
> Thanks,
> 
> Benjamin Bannier
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message