aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorStephane Gamard <stephane.gamard@searchbox.com>2014-07-15 22:23:13 +0200
committerStephane Gamard <stephane.gamard@searchbox.com>2014-07-15 22:54:53 +0200
commit14f774200b55ecc1a93cb3ede77d3f8061e553ee (patch)
treecf5147a4cc717c74a487ba73971dba380647100a /server
parent31d42e891d732235f89d5a73e8868ace1beccb3f (diff)
downloadsonarqube-14f774200b55ecc1a93cb3ede77d3f8061e553ee.tar.gz
sonarqube-14f774200b55ecc1a93cb3ede77d3f8061e553ee.zip
Commented out JVM level test
Diffstat (limited to 'server')
-rw-r--r--server/sonar-process/src/test/java/org/sonar/process/ProcessWrapperTest.java53
1 files changed, 22 insertions, 31 deletions
diff --git a/server/sonar-process/src/test/java/org/sonar/process/ProcessWrapperTest.java b/server/sonar-process/src/test/java/org/sonar/process/ProcessWrapperTest.java
index 027ac595081..d1f4eff120d 100644
--- a/server/sonar-process/src/test/java/org/sonar/process/ProcessWrapperTest.java
+++ b/server/sonar-process/src/test/java/org/sonar/process/ProcessWrapperTest.java
@@ -20,18 +20,9 @@
package org.sonar.process;
import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
-import sun.tools.jconsole.LocalVirtualMachine;
-import javax.management.MalformedObjectNameException;
import java.io.IOException;
-import java.lang.management.ManagementFactory;
-import java.lang.management.RuntimeMXBean;
import java.net.ServerSocket;
-import java.util.Collections;
-
-import static org.fest.assertions.Assertions.assertThat;
public class ProcessWrapperTest {
@@ -44,26 +35,26 @@ public class ProcessWrapperTest {
socket.close();
}
- @Test
- @Ignore("Not a good idea to assert on # of VMs")
- public void process_should_run() throws IOException, MalformedObjectNameException, InterruptedException {
-
- LocalVirtualMachine.getAllVirtualMachines().size();
- int VMcount = LocalVirtualMachine.getAllVirtualMachines().size();
-
- System.out.println("LocalVirtualMachine.getAllVirtualMachines() = " + LocalVirtualMachine.getAllVirtualMachines());
-
- RuntimeMXBean runtime = ManagementFactory.getRuntimeMXBean();
- ProcessWrapper wrapper = wrapper = new ProcessWrapper(ProcessTest.TestProcess.class.getName(),
- Collections.EMPTY_MAP, "TEST", freePort, runtime.getClassPath());
-
- assertThat(wrapper).isNotNull();
- assertThat(wrapper.isReady()).isTrue();
-
- assertThat(LocalVirtualMachine.getAllVirtualMachines().size()).isEqualTo(VMcount + 1);
-
- wrapper.stop();
- assertThat(LocalVirtualMachine.getAllVirtualMachines().size()).isEqualTo(VMcount);
-
- }
+// @Test
+// @Ignore("Not a good idea to assert on # of VMs")
+// public void process_should_run() throws IOException, MalformedObjectNameException, InterruptedException {
+//
+// LocalVirtualMachine.getAllVirtualMachines().size();
+// int VMcount = LocalVirtualMachine.getAllVirtualMachines().size();
+//
+// System.out.println("LocalVirtualMachine.getAllVirtualMachines() = " + LocalVirtualMachine.getAllVirtualMachines());
+//
+// RuntimeMXBean runtime = ManagementFactory.getRuntimeMXBean();
+// ProcessWrapper wrapper = wrapper = new ProcessWrapper(ProcessTest.TestProcess.class.getName(),
+// Collections.EMPTY_MAP, "TEST", freePort, runtime.getClassPath());
+//
+// assertThat(wrapper).isNotNull();
+// assertThat(wrapper.isReady()).isTrue();
+//
+// assertThat(LocalVirtualMachine.getAllVirtualMachines().size()).isEqualTo(VMcount + 1);
+//
+// wrapper.stop();
+// assertThat(LocalVirtualMachine.getAllVirtualMachines().size()).isEqualTo(VMcount);
+//
+// }
} \ No newline at end of file