@Override public void terminate() { deleteRecursively(baseDir); deployment = null; }
public void destroy() { deleteRecursively(targetRepo); }
public void destroy() { deleteRecursively(targetRepo); }
public void destroy() { deleteRecursively(targetRepo); }
public void destroy() { deleteRecursively(targetRepo); }
public void destroy() { deleteRecursively(targetRepo); }
public static boolean deleteDirectoryContents(File directory) { Preconditions.checkArgument(directory.isDirectory(), "Not a directory: %s", directory); // Don't delete symbolic link directories if (isSymbolicLink(directory)) { return false; } boolean success = true; for (File file : listFiles(directory)) { success = deleteRecursively(file) && success; } return success; }
@AfterMethod public void tearDown() { if (tempDir != null) { deleteRecursively(tempDir); } }
@AfterMethod public void tearDown() { if (tempDir != null) { deleteRecursively(tempDir); } }
@AfterMethod public void tearDown() throws Exception { FileUtils.deleteRecursively(tempDir); repo.destroy(); }
@AfterMethod public void tearDown() { if (tempDir != null) { deleteRecursively(tempDir); } if (installationHelper != null) { installationHelper.destroy(); } }
@AfterMethod public void tearDown() { if (tempDir != null) { deleteRecursively(tempDir); } if (installationHelper != null) { installationHelper.destroy(); } }
@AfterMethod public void tearDown() throws Exception { FileUtils.deleteRecursively(tempDir); repo.destroy(); }
public void destroy() { stop(); if (tempDir != null) { deleteRecursively(tempDir); } }
public void destroy() { stop(); if (tempDir != null) { deleteRecursively(tempDir); } }
@AfterClass public void stopServer() throws Exception { provisioner.clearAgents(); provisioner.clearCoordinators(); if (coordinatorServer != null) { coordinatorServer.stop(); } if (binaryRepoDir != null) { deleteRecursively(binaryRepoDir); } if (expectedStateDir != null) { deleteRecursively(expectedStateDir); } if (serviceInventoryCacheDir != null) { deleteRecursively(serviceInventoryCacheDir); } if (localBinaryRepoDir != null) { deleteRecursively(localBinaryRepoDir); } }
@AfterClass public void stopServer() throws Exception { closeQuietly(client); if (server != null) { server.stop(); } if (tempDir != null) { deleteRecursively(tempDir); } }
@AfterClass public void stopServer() throws Exception { if (server != null) { server.stop(); } if (tempDir != null) { deleteRecursively(tempDir); } if (installationHelper != null) { installationHelper.destroy(); } }
public InstallationHelper() throws Exception { File targetRepo = null; File binaryFile; try { targetRepo = createTempDir("repo"); binaryFile = new File(targetRepo, "binary.tar.gz"); createArchive(binaryFile); } catch (Exception e) { if (targetRepo != null) { deleteRecursively(targetRepo); } throw e; } this.targetRepo = targetRepo; appleInstallation = new Installation("apple", APPLE_ASSIGNMENT, binaryFile.toURI(), new File("README.txt").toURI(), ImmutableMap.of("memory", 512)); bananaInstallation = new Installation("banana", BANANA_ASSIGNMENT, binaryFile.toURI(), new File("README.txt").toURI(), ImmutableMap.of("cpu", 1)); }
@AfterClass public void stopServer() throws Exception { closeQuietly(client); if (server != null) { server.stop(); } if (tempDir != null) { deleteRecursively(tempDir); } if (installationHelper != null) { installationHelper.destroy(); } }