plugin.setNodeManager(new InMemoryNodeManager());
plugin.setBlockEncodingSerde(createTestingBlockEncodingManager());
plugin.setTypeManager(new TypeRegistry());
List<ConnectorFactory> factories = plugin.getServices(ConnectorFactory.class);
ConnectorFactory factory = getOnlyElement(factories);
assertInstanceOf(factory, RaptorConnectorFactory.class);
File tmpDir = Files.createTempDir();
try {
Map<String, String> config = ImmutableMap.<String, String>builder()
.put("metadata.db.type", "h2")
.put("metadata.db.filename", tmpDir.getAbsolutePath())
.put("storage.data-directory", tmpDir.getAbsolutePath())
.build();
factory.create("test", config);
}
finally {
FileUtils.deleteRecursively(tmpDir);
}
}