]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-7825 rename ProcessCommands#systemInfoUrl to #httpUrl
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Fri, 19 Aug 2016 15:48:20 +0000 (17:48 +0200)
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Tue, 23 Aug 2016 13:14:18 +0000 (15:14 +0200)
server/sonar-ce/src/main/java/org/sonar/ce/httpd/CeHttpServer.java
server/sonar-ce/src/test/java/org/sonar/ce/httpd/CeHttpServerTest.java
server/sonar-process/src/main/java/org/sonar/process/AllProcessesCommands.java
server/sonar-process/src/main/java/org/sonar/process/DefaultProcessCommands.java
server/sonar-process/src/main/java/org/sonar/process/ProcessCommands.java
server/sonar-server/src/main/java/org/sonar/server/platform/monitoring/ProcessSystemInfoClient.java
server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/ProcessSystemInfoClientTest.java

index 2a90c8192e61fb966aa18de82bc2fa2a6bf6ee20..7927ac8add5613e58d8334dd2fedb66618c8d7b1 100644 (file)
@@ -81,7 +81,7 @@ public class CeHttpServer {
     File shareDir = new File(processProps.getProperty(PROPERTY_SHARED_PATH));
     try (DefaultProcessCommands commands = DefaultProcessCommands.secondary(shareDir, processNumber)) {
       String url = getUrl();
-      commands.setSystemInfoUrl(url);
+      commands.setHttpUrl(url);
       LoggerFactory.getLogger(getClass()).debug("System Info HTTP server listening at {}", url);
     }
   }
index 2723279a29100ad09599cfdbcc4a6f4d90d34149..fc327b5d2a43b2f8cc2bad80e49ed678d824113e 100644 (file)
@@ -69,7 +69,7 @@ public class CeHttpServerTest {
   @Test
   public void start_publishes_URL_in_IPC() throws Exception {
     try (DefaultProcessCommands commands = DefaultProcessCommands.secondary(this.sharedDir, 1)) {
-      assertThat(commands.getSystemInfoUrl()).startsWith("http://127.0.0.1:");
+      assertThat(commands.getHttpUrl()).startsWith("http://127.0.0.1:");
     }
   }
 
index f5e0954f6ffae3be6c75d63ee8643d967ba8ebdb..d9bb448c1d62f4f3c1e74dfb188c993b3a7de8fa 100644 (file)
@@ -277,12 +277,12 @@ public class AllProcessesCommands implements AutoCloseable {
     }
 
     @Override
-    public void setSystemInfoUrl(String s) {
+    public void setHttpUrl(String s) {
       AllProcessesCommands.this.setSystemInfoUrl(processNumber, s);
     }
 
     @Override
-    public String getSystemInfoUrl() {
+    public String getHttpUrl() {
       return AllProcessesCommands.this.getSystemInfoUrl(processNumber);
     }
 
index 7a4182d6ceecdf59e4a2a93cb2c183499bcb6bf0..374a3509dc524e31792c2dcc6141053bcffb5c66 100644 (file)
@@ -92,13 +92,13 @@ public class DefaultProcessCommands implements ProcessCommands {
   }
 
   @Override
-  public void setSystemInfoUrl(String s) {
-    delegate.setSystemInfoUrl(s);
+  public void setHttpUrl(String s) {
+    delegate.setHttpUrl(s);
   }
 
   @Override
-  public String getSystemInfoUrl() {
-    return delegate.getSystemInfoUrl();
+  public String getHttpUrl() {
+    return delegate.getHttpUrl();
   }
 
   @Override
index 9c2f4a35a62fd6ac146f373689a59a52160244dd..9a37cd316cba0750f245bc2083ab84003d15b9fc 100644 (file)
@@ -55,9 +55,9 @@ public interface ProcessCommands extends AutoCloseable {
 
   long getLastPing();
 
-  void setSystemInfoUrl(String s);
+  void setHttpUrl(String s);
 
-  String getSystemInfoUrl();
+  String getHttpUrl();
 
   /**
    * To be executed by monitor process to ask for child process termination
index 9e319f286514f1b815976bcef9964df44004c178..ce919b9b40cf41ba8311671709842e2937851311 100644 (file)
@@ -49,7 +49,7 @@ public class ProcessSystemInfoClient {
   public Optional<ProtobufSystemInfo.SystemInfo> connect(ProcessId processId) {
     try (DefaultProcessCommands commands = DefaultProcessCommands.secondary(ipcSharedDir, processId.getIpcIndex())) {
       if (commands.isUp()) {
-        String url = commands.getSystemInfoUrl() + "/systemInfo";
+        String url = commands.getHttpUrl() + "/systemInfo";
         byte[] protobuf = IOUtils.toByteArray(new URI(url));
         return Optional.of(ProtobufSystemInfo.SystemInfo.parseFrom(protobuf));
       }
index 8020168d4939a81a7ad3fa8d717491b6264e5a76..0facb75502f6019fa463ba936adf559215c66734 100644 (file)
@@ -75,7 +75,7 @@ public class ProcessSystemInfoClientTest {
     // initialize registration of process
     try (DefaultProcessCommands processCommands = DefaultProcessCommands.secondary(ipcSharedDir, ProcessId.COMPUTE_ENGINE.getIpcIndex())) {
       processCommands.setUp();
-      processCommands.setSystemInfoUrl(format("http://%s:%d", server.getHostName(), server.getPort()));
+      processCommands.setHttpUrl(format("http://%s:%d", server.getHostName(), server.getPort()));
     }
 
     Optional<ProtobufSystemInfo.SystemInfo> info = underTest.connect(ProcessId.COMPUTE_ENGINE);
@@ -89,7 +89,7 @@ public class ProcessSystemInfoClientTest {
     // initialize registration of process
     try (DefaultProcessCommands processCommands = DefaultProcessCommands.secondary(ipcSharedDir, ProcessId.COMPUTE_ENGINE.getIpcIndex())) {
       processCommands.setUp();
-      processCommands.setSystemInfoUrl(format("http://%s:%d", server.getHostName(), server.getPort()));
+      processCommands.setHttpUrl(format("http://%s:%d", server.getHostName(), server.getPort()));
     }
 
     expectedException.expect(IllegalStateException.class);