use of com.orientechnologies.orient.etl.OETLBaseTest in project orientdb by orientechnologies.
the class OJsonRandomExtractorTest method testParallel.
@Test
public void testParallel() {
final int TOTAL = 2000000;
proc.getFactory().registerExtractor(OETLStubRandomExtractor.class);
process("{extractor : { random: {items: " + TOTAL + ", fields: 10, delay: 0} }, " + "loader: { orientdb: { dbURL: 'plocal:./target/OETLBaseTest', dbType:'graph', class: 'Person', useLightweightEdges:false, " + "classes: [{name: 'Person', extends: 'V', clusters: 8 }] } } }", new OBasicCommandContext().setVariable("parallel", Boolean.TRUE).setVariable("dumpEveryMs", 1000));
assertEquals(TOTAL, graph.countVertices("Person"));
int i = 0;
for (ODocument doc : graph.getRawGraph().browseClass("Person")) {
assertEquals(10, doc.fields());
i++;
}
}
Aggregations