<div dir="ltr">Hey Stuart,<div><br></div><div>Thanks for getting back to me. Filed a bug here: <a href="https://issues.jboss.org/browse/UNDERTOW-628">https://issues.jboss.org/browse/UNDERTOW-628</a></div><div><br></div><div>Any approximate ETA on the next version?<br></div><div><br></div><div>Thanks,</div><div>Oliver</div><br><div class="gmail_quote"><div dir="ltr">On Mon, Feb 8, 2016 at 10:25 PM Stuart Douglas <<a href="mailto:sdouglas@redhat.com" target="_blank">sdouglas@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This is not currently possible in an 'easy' manner. You could do it manually (avoiding the Undertow object and using XNIO + the listeners directly and writing your own code to handle this) however this is probably not what you are after. If you file a JIRA I should be able to get this into the next Undertow version.<br>
<br>
Stuart<br>
<br>
----- Original Message -----<br>
> From: "Oliver Dain" <<a href="mailto:oliver@analyticspot.com" target="_blank">oliver@analyticspot.com</a>><br>
> To: <a href="mailto:undertow-dev@lists.jboss.org" target="_blank">undertow-dev@lists.jboss.org</a><br>
> Sent: Tuesday, 9 February, 2016 10:27:02 AM<br>
> Subject: [undertow-dev] Let undertow pick a port<br>
><br>
><br>
><br>
> I'm trying to write some unit tests with an embedded undertow server. I’d<br>
> like to have the server find an open port. This makes the tests more robust<br>
> in many ways. For example, tests can be run in parallel and if a socket is<br>
> held in CLOSE_WAIT or something from a previous test the next test will<br>
> still run and succeed. With most servers I’ve used you can pass 0 for the<br>
> port and the server will find an open port. This doesn’t seem to be the case<br>
> with Undertow. Even if that would work, I don't see a method like getPort()<br>
> on the Undertow object so I don't know how I'd discover the port to which it<br>
> bound. Is this possible??<br>
><br>
><br>
> Thanks,<br>
> Oliver<br>
> --<br>
> CTO, Analytic Spot<br>
> 44 West Broadway #222<br>
> Eugene, OR 97401<br>
> <a href="http://analyticspot.com" rel="noreferrer" target="_blank">analyticspot.com</a> • 425-296-6556<br>
> <a href="http://www.linkedin.com/in/oliverdain" rel="noreferrer" target="_blank">www.linkedin.com/in/oliverdain</a><br>
><br>
> _______________________________________________<br>
> undertow-dev mailing list<br>
> <a href="mailto:undertow-dev@lists.jboss.org" target="_blank">undertow-dev@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/undertow-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/undertow-dev</a><br>
</blockquote></div></div><div dir="ltr">-- <br></div><div dir="ltr"><div style="font-size:small"><div style="font-size:13px;line-height:19.5px">CTO, Analytic Spot</div><div style="font-size:13px;line-height:19.5px">44 West Broadway #222</div><div style="font-size:13px;line-height:19.5px">Eugene, OR 97401<br></div><div style="font-size:13px;line-height:19.5px"><a href="http://analyticspot.com/" style="z-index: 0;">analyticspot.com</a> <span style="color:rgb(127,127,127);font-family:'helvetica neue';font-size:11px;line-height:normal">• </span>425-296-6556</div></div><div style="font-size:small"><span style="line-height:19.5px"><a href="http://www.linkedin.com/in/oliverdain" style="z-index: 0;">www.linkedin.com/in/oliverdain</a></span></div></div>