use of org.apache.solr.rest.ManagedResourceStorage.FileStorageIO in project lucene-solr by apache.
the class TestManagedResourceStorage method testFileBasedJsonStorage.
/**
* Runs persisted managed resource creation and update tests on JSON storage.
*/
@Test
public void testFileBasedJsonStorage() throws Exception {
File instanceDir = createTempDir("json-storage").toFile();
SolrResourceLoader loader = new SolrResourceLoader(instanceDir.toPath());
try {
NamedList<String> initArgs = new NamedList<>();
String managedDir = instanceDir.getAbsolutePath() + File.separator + "managed";
initArgs.add(ManagedResourceStorage.STORAGE_DIR_INIT_ARG, managedDir);
FileStorageIO fileStorageIO = new FileStorageIO();
fileStorageIO.configure(loader, initArgs);
doStorageTests(loader, fileStorageIO);
} finally {
loader.close();
}
}
Aggregations