fix(c/odata2): listen on localhost in the tests
`ODataTestServer` wasn't configured to listen on `localhost`, which
leads to timeouts in the test. This is a bit tiresome.
@@ -240,6 +240,7 @@ public class ODataTestServer extends Server implements ODataConstants {
}
httpConnector = new ServerConnector(this);
+ httpConnector.setHost("localhost");
httpConnector.setPort(httpPort); // Finds next available port if still 0
this.addConnector(httpConnector);
@@ -254,6 +255,7 @@ public class ODataTestServer extends Server implements ODataConstants {
final SslContextFactory sslContextFactory = new SslContextFactory();
sslContextFactory.setSslContext(sslContext);
httpsConnector = new ServerConnector(this, sslContextFactory, new HttpConnectionFactory(httpConfiguration));
+ httpsConnector.setHost("localhost");
httpsConnector.setPort(httpsPort); // Finds next available port if still 0
this.addConnector(httpsConnector);
}
