Skip to content

Commit 504f320

Browse files
committed
Migrate bolt stub scripts to Bolt V3
1 parent 7713f53 commit 504f320

File tree

55 files changed

+245
-177
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+245
-177
lines changed

test/internal/node/direct.driver.boltkit.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ describe('direct driver with stub server', () => {
287287

288288
boltStub.run(() => {
289289
const driver = boltStub.newDriver('bolt://127.0.0.1:9001')
290-
const session = driver.session()
290+
const session = driver.session(neo4j.session.READ)
291291
session.run('MATCH (n) RETURN n.name').catch(error => {
292292
expect(error.code).toEqual(neo4j.error.SERVICE_UNAVAILABLE)
293293

test/internal/node/routing.driver.boltkit.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -503,15 +503,15 @@ describe('routing driver with stub server', () => {
503503
9001
504504
)
505505
const readServer = boltStub.start(
506-
'./test/resources/boltstub/dead_read_server.script',
506+
'./test/resources/boltstub/dead_write_server.script',
507507
9007
508508
)
509509

510510
boltStub.run(() => {
511511
const driver = boltStub.newDriver('bolt+routing://127.0.0.1:9001')
512512
// When
513513
const session = driver.session(neo4j.session.WRITE)
514-
session.run('MATCH (n) RETURN n.name').catch(err => {
514+
session.run("CREATE (n {name:'Bob'})").catch(err => {
515515
expect(err.code).toEqual(neo4j.error.SESSION_EXPIRED)
516516
driver.close()
517517
seedServer.exit(code1 => {
@@ -1909,7 +1909,7 @@ describe('routing driver with stub server', () => {
19091909

19101910
boltStub.run(() => {
19111911
const driver = boltStub.newDriver('bolt+routing://127.0.0.1:9001')
1912-
const session = driver.session()
1912+
const session = driver.session(neo4j.session.READ)
19131913
session.run('MATCH (n) RETURN n.name AS name').then(result => {
19141914
const names = result.records.map(record => record.get('name'))
19151915
expect(names).toEqual(['Alice', 'Bob', 'Eve'])
@@ -2758,7 +2758,7 @@ describe('routing driver with stub server', () => {
27582758
'./test/resources/boltstub/address_unavailable_template.script.mst'
27592759
const server = boltStub.startWithTemplate(
27602760
serverTemplateScript,
2761-
{ query: query },
2761+
{ query: query, mode: accessMode === READ ? '"mode": "r"' : '' },
27622762
serverPort
27632763
)
27642764

test/resources/boltstub/acquire_endpoints.script

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
!: AUTO INIT
1+
!: BOLT 3
2+
!: AUTO HELLO
23
!: AUTO RESET
34
!: AUTO PULL_ALL
5+
!: AUTO GOODBYE
46

5-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}}
7+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
68
PULL_ALL
79
S: SUCCESS {"fields": ["ttl", "servers"]}
810
RECORD [9223372036854775807, [{"addresses": ["127.0.0.1:9007","127.0.0.1:9008"],"role": "WRITE"}, {"addresses": ["127.0.0.1:9005","127.0.0.1:9006"], "role": "READ"},{"addresses": ["127.0.0.1:9001","127.0.0.1:9002","127.0.0.1:9003"], "role": "ROUTE"}]]

test/resources/boltstub/acquire_endpoints_and_exit.script

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
!: AUTO INIT
1+
!: BOLT 3
2+
!: AUTO HELLO
23
!: AUTO RESET
34
!: AUTO PULL_ALL
5+
!: AUTO GOODBYE
46

5-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}}
7+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
68
PULL_ALL
79
S: SUCCESS {"fields": ["ttl", "servers"]}
810
RECORD [9223372036854775807, [{"addresses": ["127.0.0.1:9007","127.0.0.1:9008"],"role": "WRITE"}, {"addresses": ["127.0.0.1:9005","127.0.0.1:9006"], "role": "READ"},{"addresses": ["127.0.0.1:9001","127.0.0.1:9002","127.0.0.1:9003"], "role": "ROUTE"}]]

test/resources/boltstub/acquire_endpoints_v3.script

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
!: BOLT 3
22
!: AUTO RESET
3+
!: AUTO GOODBYE
34

45
C: HELLO {"scheme": "basic", "principal": "neo4j", "credentials": "password", "user_agent": "neo4j-javascript/0.0.0-dev"}
56
S: SUCCESS {"server": "Neo4j/9.9.9", "connection_id": "bolt-123456789"}

test/resources/boltstub/acquire_endpoints_v3_empty.script

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
!: BOLT 3
22
!: AUTO HELLO
33
!: AUTO RESET
4+
!: AUTO GOODBYE
45

56
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
67
PULL_ALL

test/resources/boltstub/acquire_endpoints_v3_point_to_empty_router_and_exit.script

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
!: BOLT 3
22
!: AUTO HELLO
33
!: AUTO RESET
4+
!: AUTO GOODBYE
45

56
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
67
PULL_ALL

test/resources/boltstub/acquire_endpoints_v3_three_servers_and_exit.script

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
!: BOLT 3
22
!: AUTO HELLO
3+
!: AUTO GOODBYE
34

45
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
56
PULL_ALL

test/resources/boltstub/acquire_endpoints_with_one_of_each.script

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
!: AUTO INIT
1+
!: BOLT 3
2+
!: AUTO HELLO
23
!: AUTO RESET
34
!: AUTO PULL_ALL
5+
!: AUTO GOODBYE
46

5-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}}
7+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
68
PULL_ALL
79
S: SUCCESS {"fields": ["ttl", "servers"]}
810
RECORD [9223372036854775807, [{"addresses": ["127.0.0.1:9007"],"role": "WRITE"}, {"addresses": ["127.0.0.1:9005"], "role": "READ"},{"addresses": ["127.0.0.1:9001","127.0.0.1:9002"], "role": "ROUTE"}]]
Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
!: AUTO INIT
1+
!: BOLT 3
2+
!: AUTO HELLO
23
!: AUTO RESET
34
!: AUTO PULL_ALL
4-
!: AUTO RUN "ROLLBACK" {}
5-
!: AUTO RUN "BEGIN" {}
6-
!: AUTO RUN "COMMIT" {}
5+
!: AUTO ROLLBACK
6+
!: AUTO BEGIN
7+
!: AUTO COMMIT
8+
!: AUTO GOODBYE
79

8-
C: RUN "{{{query}}}" {}
10+
C: RUN "{{{query}}}" {} { {{{mode}}} }
911
C: PULL_ALL
1012
S: FAILURE {"code": "Neo.TransientError.General.DatabaseUnavailable", "message": "Database is busy doing store copy"}
1113
S: IGNORED
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
!: AUTO INIT
1+
!: BOLT 3
2+
!: AUTO HELLO
23
!: AUTO RESET
34
!: AUTO PULL_ALL
4-
!: AUTO RUN "BEGIN" {}
5+
!: AUTO BEGIN
6+
!: AUTO GOODBYE
57

6-
C: RUN "MATCH (n) RETURN n.name" {}
8+
C: RUN "MATCH (n) RETURN n.name" {} {"mode": "r"}
79
C: PULL_ALL
810
S: <EXIT>
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
!: AUTO INIT
1+
!: BOLT 3
2+
!: AUTO HELLO
23
!: AUTO RESET
34
!: AUTO PULL_ALL
45

5-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}}
6+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
67
C: PULL_ALL
78
S: <EXIT>
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
!: AUTO INIT
1+
!: BOLT 3
2+
!: AUTO HELLO
23
!: AUTO RESET
34
!: AUTO PULL_ALL
4-
!: AUTO RUN "BEGIN" {}
5+
!: AUTO BEGIN
6+
!: AUTO GOODBYE
57

6-
C: RUN "CREATE (n {name:'Bob'})" {}
8+
C: RUN "CREATE (n {name:'Bob'})" {} {}
79
C: PULL_ALL
810
S: <EXIT>
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
!: AUTO INIT
1+
!: BOLT 3
2+
!: AUTO HELLO
23
!: AUTO RESET
34
!: AUTO PULL_ALL
5+
!: AUTO GOODBYE
46

5-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}}
7+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
68
PULL_ALL
79
S: SUCCESS {"fields": ["ttl", "servers"]}
810
RECORD [9223372036854775807, [{"addresses": ["127.0.0.1:9001", "[::1]:9001"],"role": "READ"}, {"addresses": ["[2001:db8:a0b:12f0::1]:9002","[3731:54:65fe:2::a7]:9003"], "role": "WRITE"},{"addresses": ["[ff02::1]:9001","[684D:1111:222:3333:4444:5555:6:77]:9002","[::1]:9003"], "role": "ROUTE"}]]
911
SUCCESS {}
10-
C: RUN "MATCH (n) RETURN n.name" {}
12+
C: RUN "MATCH (n) RETURN n.name" {} {"mode": "r"}
1113
PULL_ALL
1214
S: SUCCESS {"fields": ["n.name"]}
1315
SUCCESS {}
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
!: AUTO INIT
1+
!: BOLT 3
2+
!: AUTO HELLO
23
!: AUTO RESET
34
!: AUTO PULL_ALL
5+
!: AUTO GOODBYE
46

5-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}}
7+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
68
PULL_ALL
79
S: SUCCESS {"fields": ["ttl", "servers"]}
810
RECORD [9223372036854775807, [{"addresses": ["127.0.0.1:9001"],"role": "WRITE"}, {"addresses": ["127.0.0.1:9005","127.0.0.1:9003"], "role": "READ"},{"addresses": ["127.0.0.1:9004","127.0.0.1:9002","127.0.0.1:9003"], "role": "ROUTE"}]]
911
SUCCESS {}
10-
C: RUN "MATCH (n) RETURN n.name" {}
12+
C: RUN "MATCH (n) RETURN n.name" {} {}
1113
PULL_ALL
1214
S: SUCCESS {"fields": ["n.name"]}
1315
SUCCESS {}

test/resources/boltstub/discover_no_writers.script

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
!: AUTO INIT
1+
!: BOLT 3
2+
!: AUTO HELLO
23
!: AUTO RESET
34
!: AUTO PULL_ALL
5+
!: AUTO GOODBYE
46

5-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}}
7+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
68
PULL_ALL
79
S: SUCCESS {"fields": ["ttl", "servers"]}
810
RECORD [9223372036854775807, [{"addresses": [],"role": "WRITE"}, {"addresses": ["127.0.0.1:9002","127.0.0.1:9003"], "role": "READ"},{"addresses": ["127.0.0.1:9004","127.0.0.1:9005"], "role": "ROUTE"}]]

test/resources/boltstub/discover_one_router.script

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
!: AUTO INIT
1+
!: BOLT 3
2+
!: AUTO HELLO
23
!: AUTO RESET
34
!: AUTO PULL_ALL
5+
!: AUTO GOODBYE
46

5-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}}
7+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
68
PULL_ALL
79
S: SUCCESS {"fields": ["ttl", "servers"]}
810
RECORD [9223372036854775807, [{"addresses": ["127.0.0.1:9001","127.0.0.1:9002"],"role": "WRITE"}, {"addresses": ["127.0.0.1:9003","127.0.0.1:9004"], "role": "READ"},{"addresses": ["127.0.0.1:9005"], "role": "ROUTE"}]]

test/resources/boltstub/discover_servers.script

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
!: AUTO INIT
1+
!: BOLT 3
2+
!: AUTO HELLO
23
!: AUTO RESET
34
!: AUTO PULL_ALL
5+
!: AUTO GOODBYE
46

5-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}}
7+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
68
PULL_ALL
79
S: SUCCESS {"fields": ["ttl", "servers"]}
810
RECORD [9223372036854775807, [{"addresses": ["127.0.0.1:9009"],"role": "WRITE"}, {"addresses": ["127.0.0.1:9002","127.0.0.1:9003"], "role": "READ"},{"addresses": ["127.0.0.1:9001","127.0.0.1:9002","127.0.0.1:9003"], "role": "ROUTE"}]]
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
!: AUTO INIT
1+
!: BOLT 3
2+
!: AUTO HELLO
23
!: AUTO RESET
34
!: AUTO PULL_ALL
5+
!: AUTO GOODBYE
46

5-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}}
7+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
68
PULL_ALL
79
S: SUCCESS {"fields": ["ttl", "servers"]}
810
RECORD [9223372036854775807, [{"addresses": ["127.0.0.1:9001"],"role": "WRITE"}, {"addresses": ["127.0.0.1:9002","127.0.0.1:9003"], "role": "READ"},{"addresses": ["127.0.0.1:9001","127.0.0.1:9002","127.0.0.1:9003"], "role": "ROUTE"}]]
911
SUCCESS {}
10-
C: RUN "MATCH (n) RETURN n.name" {}
12+
C: RUN "MATCH (n) RETURN n.name" {} {}
1113
PULL_ALL
1214
S: SUCCESS {"fields": ["n.name"]}
1315
SUCCESS {}
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
!: AUTO INIT
1+
!: BOLT 3
2+
!: AUTO HELLO
23
!: AUTO RESET
34
!: AUTO PULL_ALL
5+
!: AUTO GOODBYE
46

5-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}}
7+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
68
PULL_ALL
79
S: SUCCESS {"fields": ["ttl", "servers"]}
810
SUCCESS {}

test/resources/boltstub/get_routing_table.script

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
!: AUTO INIT
1+
!: BOLT 3
2+
!: AUTO HELLO
23
!: AUTO RESET
34
!: AUTO PULL_ALL
5+
!: AUTO GOODBYE
46

57
S: SUCCESS {"server": "Neo4j/3.2.2"}
6-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}}
8+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
79
PULL_ALL
810
S: SUCCESS {"fields": ["ttl", "servers"]}
911
RECORD [9223372036854775807, [{"addresses": ["127.0.0.1:9001", "127.0.0.1:9002"],"role": "WRITE"}, {"addresses": ["127.0.0.1:9001", "127.0.0.1:9002"], "role": "READ"},{"addresses": ["127.0.0.1:9001", "127.0.0.1:9002"], "role": "ROUTE"}]]
1012
SUCCESS {}
11-
C: RUN "MATCH (n) RETURN n.name AS name" {}
13+
C: RUN "MATCH (n) RETURN n.name AS name" {} {"mode": "r"}
1214
PULL_ALL
1315
S: SUCCESS {"fields": ["name"]}
1416
RECORD ["Alice"]

test/resources/boltstub/get_routing_table_with_context.script

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
!: AUTO INIT
1+
!: BOLT 3
2+
!: AUTO HELLO
23
!: AUTO RESET
34
!: AUTO PULL_ALL
5+
!: AUTO GOODBYE
46

57
S: SUCCESS {"server": "Neo4j/3.2.3"}
6-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {"policy": "my_policy", "region": "china"}}
8+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {"policy": "my_policy", "region": "china"}} {}
79
PULL_ALL
810
S: SUCCESS {"fields": ["ttl", "servers"]}
911
RECORD [9223372036854775807, [{"addresses": ["127.0.0.1:9001", "127.0.0.1:9002"],"role": "WRITE"}, {"addresses": ["127.0.0.1:9001", "127.0.0.1:9002"], "role": "READ"},{"addresses": ["127.0.0.1:9001", "127.0.0.1:9002"], "role": "ROUTE"}]]
1012
SUCCESS {}
11-
C: RUN "MATCH (n) RETURN n.name AS name" {}
13+
C: RUN "MATCH (n) RETURN n.name AS name" {} {}
1214
PULL_ALL
1315
S: SUCCESS {"fields": ["name"]}
1416
RECORD ["Alice"]
Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
1-
!: AUTO INIT
1+
!: BOLT 3
2+
!: AUTO HELLO
23
!: AUTO RESET
34
!: AUTO PULL_ALL
5+
!: AUTO GOODBYE
46

5-
C: RUN "BEGIN" {"bookmark": "neo4j:bookmark:v1:tx94", "bookmarks": ["neo4j:bookmark:v1:tx5", "neo4j:bookmark:v1:tx29", "neo4j:bookmark:v1:tx94", "neo4j:bookmark:v1:tx56", "neo4j:bookmark:v1:tx16", "neo4j:bookmark:v1:tx68"]}
7+
C: BEGIN {"bookmarks": ["neo4j:bookmark:v1:tx5", "neo4j:bookmark:v1:tx29", "neo4j:bookmark:v1:tx94", "neo4j:bookmark:v1:tx56", "neo4j:bookmark:v1:tx16", "neo4j:bookmark:v1:tx68"]}
8+
C: RUN "CREATE (n {name:'Bob'})" {} {}
69
PULL_ALL
710
S: SUCCESS {}
811
SUCCESS {}
9-
C: RUN "CREATE (n {name:'Bob'})" {}
10-
PULL_ALL
11-
S: SUCCESS {}
1212
SUCCESS {"bookmark": "neo4j:bookmark:v1:tx95"}
13-
C: RUN "COMMIT" {}
14-
PULL_ALL
13+
C: COMMIT
1514
S: SUCCESS {}
16-
SUCCESS {}

test/resources/boltstub/multiple_records_get_servers.script

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
!: AUTO INIT
1+
!: BOLT 3
2+
!: AUTO HELLO
23
!: AUTO RESET
34
!: AUTO PULL_ALL
45

5-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}}
6+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
67
PULL_ALL
78
S: SUCCESS {"fields": ["ttl", "servers"]}
89
RECORD [9223372036854775807, [{"addresses": ["127.0.0.1:9001"],"role": "WRITE"}, {"addresses": ["127.0.0.1:9002","127.0.0.1:9003"], "role": "READ"},{"addresses": ["127.0.0.1:9001","127.0.0.1:9002"], "role": "ROUTE"}]]

test/resources/boltstub/no_readers_get_servers.script

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
!: AUTO INIT
1+
!: BOLT 3
2+
!: AUTO HELLO
23
!: AUTO RESET
34
!: AUTO PULL_ALL
5+
!: AUTO GOODBYE
46

5-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}}
7+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
68
PULL_ALL
79
S: SUCCESS {"fields": ["ttl", "servers"]}
810
RECORD [9223372036854775807, [{"addresses": ["127.0.0.1:9001"],"role": "WRITE"},{"addresses": ["127.0.0.1:9001","127.0.0.1:9002","127.0.0.1:9003"], "role": "ROUTE"}]]

test/resources/boltstub/no_routers_get_servers.script

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
!: AUTO INIT
1+
!: BOLT 3
2+
!: AUTO HELLO
23
!: AUTO RESET
34
!: AUTO PULL_ALL
5+
!: AUTO GOODBYE
46

5-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}}
7+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
68
PULL_ALL
79
S: SUCCESS {"fields": ["ttl", "servers"]}
810
RECORD [9223372036854775807, [{"addresses": ["127.0.0.1:9001"],"role": "WRITE"},{"addresses": ["127.0.0.1:9001"], "role": "READ"}]]

test/resources/boltstub/no_servers_entry_get_servers.script

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
!: AUTO INIT
1+
!: BOLT 3
2+
!: AUTO HELLO
23
!: AUTO RESET
34
!: AUTO PULL_ALL
5+
!: AUTO GOODBYE
46

5-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}}
7+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
68
PULL_ALL
79
S: SUCCESS {"fields": ["ttl", "notServers"]}
810
RECORD [9223372036854775807, [{"addresses": ["127.0.0.1:9001"],"role": "WRITE"}, {"addresses": ["127.0.0.1:9002","127.0.0.1:9003"], "role": "READ"},{"addresses": ["127.0.0.1:9001","127.0.0.1:9002","127.0.0.1:9003"], "role": "ROUTE"}]]

0 commit comments

Comments
 (0)