Create remote tests that uses multiple spawned JVMs
Spawn multiple JVMs when running the remoting tests, to simulate more real-world scenarios.
Use something like below:
Use something like below:
def spawnJVM(clazz: Class[_ <: AnyRef], arg: Option[String]): Process = { val Xms = "-Xms256m" val Xmx = "-Xmx512m" val separator = System.getProperty("file.separator") val classpath = System.getProperty("java.class.path") val pathToJava = System.getProperty("java.home") + separator + "bin" + separator + "java" if (arg.isEmpty) (new ProcessBuilder(pathToJava, Xms, Xmx, "-cp", classpath, clazz.getCanonicalName)).start else (new ProcessBuilder(pathToJava, Xms, Xmx, "-cp", classpath, clazz.getCanonicalName, arg.get)).start }
Leave a comment