You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
db.execute("MATCH (p:Person {name:'Pippo'}) SET p.surname = 'Pippo_update'").close()
745
+
db.execute("MATCH (p:Person {name:'Pippo'}) SET p.address = 'Rome'").close()
746
+
747
+
db.execute("MATCH (p:Person {name:'Pluto'}) SET p.surname = 'Pluto_update'").close()
748
+
db.execute("MATCH (p:Person {name:'Pluto'}) SET p.address = 'London'").close()
749
+
750
+
db.execute("MATCH (p:Person {name:'Foo'}) SET p.surname = 'Foo_update'").close()
751
+
db.execute("MATCH (p:Person {name:'Foo'}) SET p.address = 'Rome'").close()
752
+
753
+
db.execute("MATCH (p:Person {name:'Bar'}) SET p.surname = 'Bar_update'").close()
754
+
db.execute("MATCH (p:Person {name:'Bar'}) SET p.address = 'Tokyo'").close()
755
+
756
+
db.execute("MATCH (:Person {name:'Foo'})-[rel:KNOWS]->(:Person {name:'Bar'}) SET rel.since = 1999").close()
757
+
db.execute("MATCH (:Person {name:'Pippo'})-[rel:KNOWS]->(:Person {name:'Pluto'}) SET rel.since = 2019").close()
758
+
759
+
val records = consumer.poll(30000)
760
+
761
+
assertEquals(23, records.count())
762
+
763
+
val firstExpectedKey = firstKey ?: idPippo.toString()
764
+
val secondExpectedKey = secondKey ?: idPluto.toString()
765
+
val thirdExpectedKey = thirdKey ?: idFoo.toString()
766
+
val fourthExpectedKey = fourthKey ?: idBar.toString()
767
+
// we take the records for each node
768
+
val firstRecordNode = records.filter { JSONUtils.readValue<Any>(it.key()) == firstExpectedKey }
769
+
val secondRecordNode = records.filter { JSONUtils.readValue<Any>(it.key()) == secondExpectedKey }
770
+
val thirdRecordNode = records.filter { JSONUtils.readValue<Any>(it.key()) == thirdExpectedKey }
771
+
val fourthRecordNode = records.filter { JSONUtils.readValue<Any>(it.key()) == fourthExpectedKey }
772
+
val firstRecordRel = records.filter { JSONUtils.readValue<Any>(it.key()) ==mapOf("start" to thirdExpectedKey, "end" to fourthExpectedKey, "label" to relType) }
773
+
val secondRecordRel = records.filter { JSONUtils.readValue<Any>(it.key()) ==mapOf("start" to firstExpectedKey, "end" to secondExpectedKey, "label" to relType) }
774
+
775
+
// we check that all queries produced record
776
+
assertEquals(3, firstRecordNode.count())
777
+
assertEquals(3, secondRecordNode.count())
778
+
assertEquals(3, thirdRecordNode.count())
779
+
assertEquals(3, fourthRecordNode.count())
780
+
assertEquals(2, firstRecordRel.count())
781
+
assertEquals(2, secondRecordRel.count())
782
+
783
+
// we check that each node/relationship has no records spread across multiple partitions
0 commit comments