@Test public void testCopyTo() { graph = createGraph(); initExampleGraph(graph); GraphStorage gs = newRAMGraph(); gs.setSegmentSize(8000); gs.create(10); try { graph.copyTo(gs); checkExampleGraph(gs); } catch (Exception ex) { ex.printStackTrace(); assertTrue(ex.toString(), false); } try { Helper.close((Closeable) graph); graph = createGraph(); gs.copyTo(graph); checkExampleGraph(graph); } catch (Exception ex) { ex.printStackTrace(); assertTrue(ex.toString(), false); } Helper.close((Closeable) graph); }
@Override public GraphStorage createGraph(String location, boolean is3D) { GraphStorage gs = new GraphBuilder(encodingManager).set3D(is3D).setLocation(location).setMmap(true).build(); gs.setSegmentSize(defaultSize / 2); gs.create(defaultSize); return gs; }