@@ -614,36 +614,42 @@ def generate_address_book_graph(session, size):
614
614
615
615
616
616
def generate_large_complex_graph (session , size ):
617
- to_run = '''schema.config().option('graph.schema_mode').set('development');
618
- int size = 2000;
619
- List ids = new ArrayList();
620
- schema.propertyKey('ts').Int().single().ifNotExists().create();
621
- schema.propertyKey('sin').Int().single().ifNotExists().create();
622
- schema.propertyKey('cos').Int().single().ifNotExists().create();
623
- schema.propertyKey('ii').Int().single().ifNotExists().create();
624
- schema.vertexLabel('lcg').properties('ts', 'sin', 'cos', 'ii').ifNotExists().create();
625
- schema.edgeLabel('linked').connection('lcg', 'lcg').ifNotExists().create();
626
- Vertex v = graph.addVertex(label, 'lcg');
627
- v.property("ts", 100001);
628
- v.property("sin", 0);
629
- v.property("cos", 1);
630
- v.property("ii", 0);
617
+ prof = session .execution_profile_clone_update (EXEC_PROFILE_GRAPH_DEFAULT , request_timeout = 32 )
618
+ to_run = '''
619
+ schema.config().option('graph.schema_mode').set('development');
620
+ schema.config().option('graph.allow_scan').set('true');
621
+ '''
622
+ session .execute_graph (to_run , execution_profile = prof )
623
+ to_run = '''
624
+ int size = 2000;
625
+ List ids = new ArrayList();
626
+ schema.propertyKey('ts').Int().single().ifNotExists().create();
627
+ schema.propertyKey('sin').Int().single().ifNotExists().create();
628
+ schema.propertyKey('cos').Int().single().ifNotExists().create();
629
+ schema.propertyKey('ii').Int().single().ifNotExists().create();
630
+ schema.vertexLabel('lcg').properties('ts', 'sin', 'cos', 'ii').ifNotExists().create();
631
+ schema.edgeLabel('linked').connection('lcg', 'lcg').ifNotExists().create();
632
+ Vertex v = graph.addVertex(label, 'lcg');
633
+ v.property("ts", 100001);
634
+ v.property("sin", 0);
635
+ v.property("cos", 1);
636
+ v.property("ii", 0);
637
+ ids.add(v.id());
638
+ Random rand = new Random();
639
+ for (int ii = 1; ii < size; ii++) {
640
+ v = graph.addVertex(label, 'lcg');
641
+ v.property("ii", ii);
642
+ v.property("ts", 100001 + ii);
643
+ v.property("sin", Math.sin(ii/5.0));
644
+ v.property("cos", Math.cos(ii/5.0));
645
+ Vertex u = g.V(ids.get(rand.nextInt(ids.size()))).next();
646
+ v.addEdge("linked", u);
647
+ ids.add(u.id());
631
648
ids.add(v.id());
632
- Random rand = new Random();
633
- for (int ii = 1; ii < size; ii++) {
634
- v = graph.addVertex(label, 'lcg');
635
- v.property("ii", ii);
636
- v.property("ts", 100001 + ii);
637
- v.property("sin", Math.sin(ii/5.0));
638
- v.property("cos", Math.cos(ii/5.0));
639
- Vertex u = g.V(ids.get(rand.nextInt(ids.size()))).next();
640
- v.addEdge("linked", u);
641
- ids.add(u.id());
642
- ids.add(v.id());
643
- }
644
- g.V().count();'''
645
- prof = session .execution_profile_clone_update (EXEC_PROFILE_GRAPH_DEFAULT , request_timeout = 32 )
646
- session .execute_graph (to_run , execution_profile = prof )
649
+ }
650
+ g.V().count();'''
651
+
652
+ session .execute_graph (to_run , execution_profile = prof )
647
653
648
654
649
655
def validate_classic_vertex (test , vertex ):
0 commit comments