use of aQute.remote.util.JMXBundleDeployer in project liferay-blade-samples by liferay.
the class BladeLanguageWebTest method create.
@Deployment
public static JavaArchive create() throws Exception {
final File jarFile = new File(System.getProperty("languageWebJarFile"));
final File languageJar = new File(System.getProperty("languageJarFile"));
new JMXBundleDeployer().deploy(_languageJarBSN, languageJar);
return ShrinkWrap.createFromZipFile(JavaArchive.class, jarFile);
}
use of aQute.remote.util.JMXBundleDeployer in project liferay-blade-samples by liferay.
the class BladePortletGreedyPolicyOptionTest method testBladePortletReluctant.
@Test
public void testBladePortletReluctant() throws Exception {
_webDriver.get(_reluctantPortletURL.toExternalForm());
Assert.assertTrue("Portlet was not deployed", BladeSampleFunctionalActionUtil.isVisible(_webDriver, _bladeSampleReluctantPortlet));
Assert.assertTrue("Expected Reluctant Portlet, but saw " + _reluctantPortletTitle.getText(), _reluctantPortletTitle.getText().contentEquals("Reluctant Portlet"));
Assert.assertTrue("Expected SomeService says I am Default!, but saw " + _reluctantPortletBody.getText(), _reluctantPortletBody.getText().contentEquals("SomeService says I am Default!"));
final File higherRankedServiceJar = new File(System.getProperty("greedyHigherRankedServiceJarFile"));
new JMXBundleDeployer().deploy(_higherRankedServiceJarBSN, higherRankedServiceJar);
_webDriver.navigate().refresh();
Assert.assertTrue("Expected SomeService says I am Default!, but saw " + _reluctantPortletBody.getText(), BladeSampleFunctionalActionUtil.isTextPresent(_webDriver, _reluctantPortletBody, "SomeService says I am Default!"));
final File greedyServiceReferenceConfigFile = new File(System.getProperty("greedyServiceReferenceProjectdir"), "configs/com.liferay.blade.reluctant.vs.greedy.portlet.portlet." + "ReluctantPortlet.cfg");
final File osgiConfigDir = new File(System.getProperty("liferayHome"), "osgi/configs");
File configFile = new File(osgiConfigDir, "com.liferay.blade.reluctant.vs.greedy.portlet.portlet." + "ReluctantPortlet.cfg");
IO.copy(greedyServiceReferenceConfigFile, configFile);
Thread.sleep(10000);
_webDriver.navigate().refresh();
Assert.assertTrue("Expected SomeService says I am better, use me!, but saw " + _reluctantPortletBody.getText(), BladeSampleFunctionalActionUtil.isTextPresent(_webDriver, _reluctantPortletBody, "SomeService says I am better, use me!"));
}
Aggregations