LOG.debug("Creating test helper for Direct I/O (basePath={})", rootPath);
this.variables = new VariableTable(RedefineStrategy.ERROR);
variables.defineVariables(context.getArguments());
String resolvedRootPath = resolve(rootPath);
LOG.debug("Resolved base path: {} -> {}", rootPath, resolvedRootPath);
DirectDataSourceRepository repo = getRepository();
try {
this.id = repo.getRelatedId(resolvedRootPath);
this.dataSource = repo.getRelatedDataSource(resolvedRootPath);
} catch (IOException e) {
throw new IOException(MessageFormat.format(
"Failed to initialize Direct I/O for \"{0}\", please check configuration ({1})",
resolvedRootPath,
findExtraConfiguration()), e);
} catch (InterruptedException e) {
throw (IOException) new InterruptedIOException("interrupted").initCause(e);
}
this.fullPath = resolvedRootPath;
this.containerPath = repo.getContainerPath(resolvedRootPath);
this.basePath = repo.getComponentPath(resolvedRootPath);
LOG.debug("Direct I/O Mapping: {} -> id={}", resolvedRootPath, id);
}