private void cleanupStorage() throws IOException { try { FileUtils.deleteDirectory(new File(config.getXenonConfig().getStoragePath())); } catch (Exception e) { // this error can happen when lucene did not release all file handles yet // however the devbox cleanup task will clean up left over temp folders. } }
private void createConfig() throws IOException, BadConfigException { String storagePath = Files.createTempDirectory(".xenon").toAbsolutePath().toString(); config = ConfigBuilder.build( CloudStoreConfig.class, CloudStoreServiceGroupTest.class.getResource(configFilePath).getPath()); config.getXenonConfig().setStoragePath(storagePath); }