use of org.locationtech.geogig.api.TestPlatform in project GeoGig by boundlessgeo.
the class DataStoreConcurrencyTest method beforeTest.
@Before
public void beforeTest() throws Exception {
File workingDirectory = tmp.newFolder("repo");
File userHomeDirectory = tmp.newFolder("home");
TestPlatform platform = new TestPlatform(workingDirectory);
platform.setUserHome(userHomeDirectory);
Context injector = new CLITestContextBuilder(platform).build();
GeoGIG geogig = new GeoGIG(injector);
geogig.command(InitOp.class).call();
geogig.command(ConfigOp.class).setAction(ConfigAction.CONFIG_SET).setName("user.name").setValue("gabriel").call();
geogig.command(ConfigOp.class).setAction(ConfigAction.CONFIG_SET).setName("user.email").setValue("gabriel@roldan.example.com").call();
store = new GeoGigDataStore(geogig);
store.createSchema(pointType);
editThreads = Executors.newFixedThreadPool(writeThreadCount, new ThreadFactoryBuilder().setNameFormat("edit-thread-%d").build());
readThreads = Executors.newFixedThreadPool(readThreadCount, new ThreadFactoryBuilder().setNameFormat("read-thread-%d").build());
initialCommitCount = copyOf(store.getGeogig().command(LogOp.class).call()).size();
}
use of org.locationtech.geogig.api.TestPlatform in project GeoGig by boundlessgeo.
the class AbstractNodeIndexTest method before.
@Before
public void before() {
tempFolder.newFolder(".geogig");
File workingDirectory = tempFolder.getRoot();
Platform platform = new TestPlatform(workingDirectory);
executorService = Executors.newFixedThreadPool(4);
index = createIndex(platform, executorService);
}
use of org.locationtech.geogig.api.TestPlatform in project GeoGig by boundlessgeo.
the class GraphDatabaseTest method setUp.
@Before
public void setUp() throws Exception {
File root = tmpFolder.getRoot();
tmpFolder.newFolder(".geogig");
platform = new TestPlatform(root);
platform.setUserHome(tmpFolder.newFolder("fake_home"));
database = createDatabase(platform);
database.open();
}
use of org.locationtech.geogig.api.TestPlatform in project GeoGig by boundlessgeo.
the class DepthSearchTest method setUp.
@Before
public void setUp() throws IOException {
File envHome = tempFolder.getRoot();
Platform testPlatform = new TestPlatform(envHome);
Context injector = Guice.createInjector(Modules.override(new GeogigModule()).with(new MemoryModule(testPlatform))).getInstance(Context.class);
fakeGeogig = new GeoGIG(injector);
Repository fakeRepo = fakeGeogig.getOrCreateRepository();
odb = fakeRepo.objectDatabase();
search = new DepthSearch(odb);
RevTreeBuilder root = new RevTreeBuilder(odb);
root = addTree(root, "path/to/tree1", "node11", "node12", "node13");
root = addTree(root, "path/to/tree2", "node21", "node22", "node23");
root = addTree(root, "tree3", "node31", "node32", "node33");
RevTree rootTree = root.build();
odb.put(rootTree);
rootTreeId = rootTree.getId();
}
use of org.locationtech.geogig.api.TestPlatform in project GeoGig by boundlessgeo.
the class GraphDatabaseStressTest method setUp.
@Before
public void setUp() throws Exception {
File root = tmpFolder.getRoot();
tmpFolder.newFolder(".geogig");
platform = new TestPlatform(root);
platform.setUserHome(tmpFolder.newFolder("fake_home"));
database = createDatabase(platform);
database.open();
}
Aggregations