RestoreExecutionAdapter execution = null; if (restore.getId() != null) { Object lookup = lookupBackupExecutionsContext(String.valueOf(restore.getId()), false, false); if (lookup != null) { getBackupFacade().restartExecution(restore.getId()); LOGGER.log(Level.INFO, "Restore restarted: " + restore.getArchiveFile()); "Could not restart the restore: " + restore.getArchiveFile()); getBackupFacade() .runRestoreAsync( restore.getArchiveFile(), restore.getWsFilter(), restore.getSiFilter(), restore.getLiFilter(), asParams(restore.getOptions())); LOGGER.log(Level.INFO, "Restore file: " + restore.getArchiveFile());
final Catalog restoreCatalog = restoreExecution.getRestoreCatalog(); assertNotNull(restoreCatalog); && (restoreExecution.getStatus() != BatchStatus.COMPLETED || !restoreExecution.isRunning())) { Thread.sleep(100); cnt++; if (restoreExecution.getStatus() == BatchStatus.ABANDONED || restoreExecution.getStatus() == BatchStatus.FAILED || restoreExecution.getStatus() == BatchStatus.UNKNOWN) { for (Throwable exception : restoreExecution.getAllFailureExceptions()) { LOGGER.log(Level.INFO, "ERROR: " + exception.getLocalizedMessage(), exception); exception.printStackTrace(); if (restoreExecution.getStatus() != BatchStatus.COMPLETED && !restoreExecution.isRunning()) { backupFacade.stopExecution(restoreExecution.getId()); if (restoreExecution.getStatus() == BatchStatus.COMPLETED) { GeoServer geoServer = getGeoServer(); assertEquals(null, geoServer.getLogging().getLocation());
final Catalog restoreCatalog = restoreExecution.getRestoreCatalog(); assertNotNull(restoreCatalog); while (cnt < 100 && (restoreExecution.getStatus() != BatchStatus.COMPLETED)) { Thread.sleep(100); cnt++; if (restoreExecution.getStatus() == BatchStatus.ABANDONED || restoreExecution.getStatus() == BatchStatus.FAILED || restoreExecution.getStatus() == BatchStatus.UNKNOWN) { for (Throwable exception : restoreExecution.getAllFailureExceptions()) { LOGGER.log(Level.INFO, "ERROR: " + exception.getLocalizedMessage(), exception); exception.printStackTrace(); assertEquals(restoreExecution.getStatus(), BatchStatus.COMPLETED); if (restoreCatalog.getWorkspaces().size() > 0) { assertEquals(9, restoreCatalog.getDataStores().size());
try { File file = ((RestoreExecutionAdapter) lookup).getArchiveFile().file(); InputStream is = new FileInputStream(file);
final Catalog restoreCatalog = restoreExecution.getRestoreCatalog(); assertNotNull(restoreCatalog); && (restoreExecution.getStatus() != BatchStatus.COMPLETED || !restoreExecution.isRunning())) { Thread.sleep(100); cnt++; if (restoreExecution.getStatus() == BatchStatus.ABANDONED || restoreExecution.getStatus() == BatchStatus.FAILED || restoreExecution.getStatus() == BatchStatus.UNKNOWN) { for (Throwable exception : restoreExecution.getAllFailureExceptions()) { LOGGER.log(Level.INFO, "ERROR: " + exception.getLocalizedMessage(), exception); exception.printStackTrace(); if (restoreExecution.getStatus() != BatchStatus.COMPLETED && restoreExecution.isRunning()) { backupFacade.stopExecution(restoreExecution.getId()); if (restoreExecution.getStatus() == BatchStatus.COMPLETED) { assertThat(ContinuableHandler.getInvocationsCount() > 2, is(true));
final Catalog restoreCatalog = restoreExecution.getRestoreCatalog(); assertNotNull(restoreCatalog); && (restoreExecution.getStatus() != BatchStatus.COMPLETED || !restoreExecution.isRunning())) { Thread.sleep(100); cnt++; if (restoreExecution.getStatus() == BatchStatus.ABANDONED || restoreExecution.getStatus() == BatchStatus.FAILED || restoreExecution.getStatus() == BatchStatus.UNKNOWN) { for (Throwable exception : restoreExecution.getAllFailureExceptions()) { LOGGER.log(Level.INFO, "ERROR: " + exception.getLocalizedMessage(), exception); exception.printStackTrace(); if (restoreExecution.getStatus() != BatchStatus.COMPLETED && restoreExecution.isRunning()) { backupFacade.stopExecution(restoreExecution.getId()); if (restoreExecution.getStatus() == BatchStatus.COMPLETED) { assertThat(ContinuableHandler.getInvocationsCount() > 2, is(true));