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'")
692
+
db.execute("MATCH (p:Person {name:'Pippo'}) SET p.address = 'Rome'")
693
+
694
+
db.execute("MATCH (p:Person {name:'Pluto'}) SET p.surname = 'Pluto_update'")
695
+
db.execute("MATCH (p:Person {name:'Pluto'}) SET p.address = 'London'")
696
+
697
+
db.execute("MATCH (p:Person {name:'Foo'}) SET p.surname = 'Foo_update'")
698
+
db.execute("MATCH (p:Person {name:'Foo'}) SET p.address = 'Rome'")
699
+
700
+
db.execute("MATCH (p:Person {name:'Bar'}) SET p.surname = 'Bar_update'")
701
+
db.execute("MATCH (p:Person {name:'Bar'}) SET p.address = 'Tokyo'")
702
+
703
+
db.execute("MATCH (:Person {name:'Foo'})-[rel:KNOWS]->(:Person {name:'Bar'}) SET rel.since = 1999")
704
+
db.execute("MATCH (:Person {name:'Pippo'})-[rel:KNOWS]->(:Person {name:'Pluto'}) SET rel.since = 2019")
705
+
706
+
val records = kafkaConsumer.poll(Duration.ofSeconds(30))
707
+
708
+
assertEquals(23, records.count())
709
+
710
+
// we take the records for each node
711
+
val firstRecordNode = records.filter { JSONUtils.readValue<Any>(it.key()) == firstExpectedKey }
712
+
val secondRecordNode = records.filter { JSONUtils.readValue<Any>(it.key()) == secondExpectedKey }
713
+
val thirdRecordNode = records.filter { JSONUtils.readValue<Any>(it.key()) == thirdExpectedKey }
714
+
val fourthRecordNode = records.filter { JSONUtils.readValue<Any>(it.key()) == fourthExpectedKey }
715
+
val firstRecordRel = records.filter { JSONUtils.readValue<Any>(it.key()) ==mapOf("start" to thirdExpectedKey, "end" to fourthExpectedKey, "label" to relType) }
716
+
val secondRecordRel = records.filter { JSONUtils.readValue<Any>(it.key()) ==mapOf("start" to firstExpectedKey, "end" to secondExpectedKey, "label" to relType) }
717
+
718
+
// we check that all queries produced record
719
+
assertEquals(3, firstRecordNode.count())
720
+
assertEquals(3, secondRecordNode.count())
721
+
assertEquals(3, thirdRecordNode.count())
722
+
assertEquals(3, fourthRecordNode.count())
723
+
assertEquals(2, firstRecordRel.count())
724
+
assertEquals(2, secondRecordRel.count())
725
+
726
+
// we check that each node/relationship has no records spread across multiple partitions
0 commit comments