if (bch != null)
{
backupManagerImpl.stopBackup(bch);
}
TesterConfigurationHelper helper = TesterConfigurationHelper.getInstance();
RepositoryEntry repositoryEntryIsolated = helper.copyRepositoryEntry(repositoryService.getRepository(repositoryName).getConfiguration());
for (WorkspaceEntry we : repositoryEntryIsolated.getWorkspaceEntries())
{
List<SimpleParameterEntry> props = we.getContainer().getParameters();
for (int i = 0; i < props.size(); i++)
{
SimpleParameterEntry spe = props.get(i);
if (spe.getName().equals(JDBCWorkspaceDataContainer.DB_STRUCTURE_TYPE))
{
props.set(i, new SimpleParameterEntry(spe.getName(), DatabaseStructureType.ISOLATED.toString()));
break;
}
}
}
// restore single backup on structure single to isolated
{
RepositoryEntry newRE = helper.copyRepositoryEntry(repositoryEntryIsolated);
File backLog = new File(bch.getLogFilePath());
assertTrue(backLog.exists());
RepositoryBackupChainLog bchLog = new RepositoryBackupChainLog(backLog);
backupManagerImpl.restoreExistingRepository(bchLog, newRE, false);
checkConent(newRE.getName());
String dbStructureType = repositoryService.getRepository(repositoryName).getConfiguration().getWorkspaceEntries().get(0).getContainer().getParameterValue(JDBCWorkspaceDataContainer.DB_STRUCTURE_TYPE);
assertTrue(DatabaseStructureType.ISOLATED.toString().equalsIgnoreCase(dbStructureType));
}
// restore single backup on structure isolated to isolated
{
RepositoryEntry newRE = helper.copyRepositoryEntry(repositoryEntryIsolated);
File backLog = new File(bch.getLogFilePath());
assertTrue(backLog.exists());
RepositoryBackupChainLog bchLog = new RepositoryBackupChainLog(backLog);