use of com.liferay.ide.server.tomcat.core.ILiferayTomcatServerWC in project liferay-ide by liferay.
the class ServerCustomSettingTests method testVMArgsWithCustomMemoryArgs.
@Test
public void testVMArgsWithCustomMemoryArgs() throws Exception {
if (shouldSkipBundleTests())
return;
final NullProgressMonitor npm = new NullProgressMonitor();
if (runtime == null) {
setupRuntime();
}
assertNotNull(runtime);
final IServerWorkingCopy serverWC = createServerForRuntime("testvmargs", runtime);
ILiferayTomcatServerWC wc = (ILiferayTomcatServerWC) serverWC.loadAdapter(ILiferayTomcatServerWC.class, npm);
wc.setMemoryArgs("-Xmx2048m");
final IServer newServer = serverWC.save(true, npm);
final LiferayTomcatServerBehavior behavior = (LiferayTomcatServerBehavior) newServer.loadAdapter(LiferayTomcatServerBehavior.class, npm);
assertEquals("-Xmx2048m", behavior.getRuntimeVMArguments()[6]);
}
Aggregations