diff options
author | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2017-09-06 14:38:25 +0200 |
---|---|---|
committer | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2017-09-13 15:50:50 +0200 |
commit | 0d06d27d3c0f1a35384b40926e34dc0020de998d (patch) | |
tree | 1246636c4acf1d1c5d9c00de23dfada6646f17bd /tests | |
parent | 893b3d2f8d5e5d2789cd5c954d8016742bfc18e5 (diff) | |
download | sonarqube-0d06d27d3c0f1a35384b40926e34dc0020de998d.tar.gz sonarqube-0d06d27d3c0f1a35384b40926e34dc0020de998d.zip |
SONAR-9741 make NetworkUtils an interface
to allow unit testing
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/test/java/org/sonarqube/tests/Byteman.java | 2 | ||||
-rw-r--r-- | tests/src/test/java/org/sonarqube/tests/settings/ElasticsearchSettingsTest.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/src/test/java/org/sonarqube/tests/Byteman.java b/tests/src/test/java/org/sonarqube/tests/Byteman.java index 315d2c2cd01..2de41f2acbd 100644 --- a/tests/src/test/java/org/sonarqube/tests/Byteman.java +++ b/tests/src/test/java/org/sonarqube/tests/Byteman.java @@ -50,7 +50,7 @@ public class Byteman { public Byteman(OrchestratorBuilder builder, Process process) { this.builder = builder; String jar = findBytemanJar(); - port = NetworkUtils.getNextAvailablePort(InetAddress.getLoopbackAddress()); + port = NetworkUtils.INSTANCE.getNextAvailablePort(InetAddress.getLoopbackAddress()); String bytemanArg = format("-javaagent:%s=boot:%s,port:%d", jar, jar, port); builder.setServerProperty(process.argument, bytemanArg); } diff --git a/tests/src/test/java/org/sonarqube/tests/settings/ElasticsearchSettingsTest.java b/tests/src/test/java/org/sonarqube/tests/settings/ElasticsearchSettingsTest.java index 195278edbcb..ee69c552878 100644 --- a/tests/src/test/java/org/sonarqube/tests/settings/ElasticsearchSettingsTest.java +++ b/tests/src/test/java/org/sonarqube/tests/settings/ElasticsearchSettingsTest.java @@ -33,7 +33,7 @@ public class ElasticsearchSettingsTest { @Test public void set_http_port_through_sonar_properties() throws Exception { - int port = NetworkUtils.getNextAvailablePort(InetAddress.getLoopbackAddress()); + int port = NetworkUtils.INSTANCE.getNextAvailablePort(InetAddress.getLoopbackAddress()); Orchestrator orchestrator = Orchestrator .builderEnv() .setServerProperty("sonar.search.httpPort", "" + port) |