/** * Tests invalid deployment of multiple roots within a WAR Should be started first--arquillian * deployments are not perfectly isolated. */ @Test @InSequence(-2) public void uiPathCollisionBreaksDeployment() throws MalformedURLException { assertThat(RootUI.getNumberOfInstances(), is(0)); deployer.deploy("uiPathCollision"); openWindowNoWait(deriveMappingForUI(PathCollisionUI.class)); final String expectedErrorMessage = this.firstWindow.getBodyText(); assertThat( expectedErrorMessage, containsString("VaadinCDIServlet deployment aborted. Reason:")); assertThat(RootUI.getNumberOfInstances(), is(0)); }
/** * Tests invalid deployment of multiple roots within a WAR Should be before the regular * tests--arquillian deployments are not perfectly isolated. */ @Test @InSequence(-1) public void multipleRootsBreakDeployment() throws MalformedURLException { assertThat(RootUI.getNumberOfInstances(), is(0)); deployer.deploy("multipleRoots"); openWindowNoWait(""); final String expectedErrorMessage = this.firstWindow.getBodyText(); assertThat( expectedErrorMessage, containsString("VaadinCDIServlet deployment aborted. Reason:")); assertThat(RootUI.getNumberOfInstances(), is(0)); }
public void testZipWithDeploymentScriptAndClassesCanBeDeployed() throws FileSystemException, MalformedURLException, ClassNotFoundException, IllegalAccessException, NoSuchMethodException, InvocationTargetException, InstantiationException { DefaultFileSystemManager manager = new DefaultFileSystemManager(); FileObject applicationFolder = getApplicationArchive(manager); Deployer deployer = new NanoContainerDeployer(manager); ObjectReference containerRef = deployer.deploy(applicationFolder, getClass().getClassLoader(), null); PicoContainer pico = (PicoContainer) containerRef.get(); Object zap = pico.getComponentInstance("zap"); assertEquals("Groovy Started", zap.toString()); }
private void deployAndLaunch() { try { LogUtils.i("Kill existing manager process"); LogUtils.i("try to kill manager process before launch"); ManagerProcess.kill(); } catch (Exception e) { LogUtils.e("failed to kill manager process before launch", e); LogUtils.i("failed to kill manager process before launch"); } Deployer deployer = new Deployer(this); String fatalError = deployer.deploy(); if (!fatalError.isEmpty()) { handleFatalError(fatalError); return; } updateConfigFile(this); LogUtils.i("Launching..."); if (ShellUtils.checkRooted()) { fatalError = launch(false); if (fatalError.isEmpty()) { sendBroadcast(new LaunchedIntent(false)); } else { handleFatalError(fatalError); } } else { if (Build.VERSION.SDK_INT < 14) { handleFatalError("[ROOT] is required"); return; } fatalError = launch(true); if (fatalError.isEmpty()) { sendBroadcast(new LaunchedIntent(true)); } else { handleFatalError(fatalError); } } }
public void deploy(DeploymentEntity deployment, Map<String, Object> deploymentSettings) { for (Deployer deployer : deployers) { deployer.deploy(deployment, deploymentSettings); } }
public void deploy(DeploymentEntity deployment) { for (Deployer deployer : deployers) { deployer.deploy(deployment); } }