Skip to content

Commit e0cdb25

Browse files
committed
fix: supportsMultiDb and supportsTransactionConfig where not trying resolved adresses
This methods were only trying to connect to the seed server address to check the protocol version.
1 parent 059f49a commit e0cdb25

30 files changed

+32
-35
lines changed

bolt-connection/src/connection-provider/connection-provider-routing.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,12 +174,11 @@ export default class RoutingConnectionProvider extends PooledConnectionProvider
174174
for (let i = 0; i < addresses.length; i++) {
175175
try {
176176
const connection = await createChannelConnection(
177-
this._address,
177+
addresses[i],
178178
this._config,
179179
this._createConnectionErrorHandler(),
180180
this._log
181181
)
182-
183182
const protocolVersion = connection.protocol()
184183
? connection.protocol().version
185184
: null
@@ -194,8 +193,6 @@ export default class RoutingConnectionProvider extends PooledConnectionProvider
194193
} catch (error) {
195194
lastError = error
196195
}
197-
198-
return false
199196
}
200197

201198
if (lastError) {

bolt-connection/src/connection/connection-channel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ export default class ChannelConnection extends Connection {
188188
if (metadata) {
189189
// read server version from the response metadata, if it is available
190190
const serverVersion = metadata.server
191-
if (!this.version) {
191+
if (!this.version || serverVersion) {
192192
this.version = serverVersion
193193
}
194194

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

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

618618
function getRoutingTable (driver, database) {
619619
const connectionProvider = driver._getOrCreateConnectionProvider()
620-
return connectionProvider._routingTables[database || '']
620+
return connectionProvider._routingTableRegistry.get(database || '', {})
621621
}
622622

623623
function numberOfOpenConnections (driver) {

test/resources/boltstub/v3/acquire_endpoints.script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
!: AUTO RESET
44
!: AUTO GOODBYE
55

6-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
6+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {"address": "127.0.0.1:9001"}} {}
77
PULL_ALL
88
S: SUCCESS {"fields": ["ttl", "servers"]}
99
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/v3/acquire_endpoints_and_exit.script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
!: AUTO HELLO
33
!: AUTO RESET
44

5-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
5+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {"address": "127.0.0.1:9001"}} {}
66
PULL_ALL
77
S: SUCCESS {"fields": ["ttl", "servers"]}
88
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/v3/acquire_endpoints_dead.script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
!: AUTO HELLO
33
!: AUTO RESET
44

5-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
5+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {"address": "127.0.0.1:9001"}} {}
66
PULL_ALL
77
S: <EXIT>

test/resources/boltstub/v3/acquire_endpoints_multiple_records.script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
!: AUTO RESET
44
!: AUTO GOODBYE
55

6-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
6+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {"address": "127.0.0.1:9001"}} {}
77
PULL_ALL
88
S: SUCCESS {"fields": ["ttl", "servers"]}
99
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/v3/acquire_endpoints_no_readers.script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
!: AUTO RESET
44
!: AUTO GOODBYE
55

6-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
6+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {"address": "127.0.0.1:9001"}} {}
77
PULL_ALL
88
S: SUCCESS {"fields": ["ttl", "servers"]}
99
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/v3/acquire_endpoints_no_records.script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
!: AUTO RESET
44
!: AUTO GOODBYE
55

6-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
6+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {"address": "127.0.0.1:9001"}} {}
77
PULL_ALL
88
S: SUCCESS {"fields": ["ttl", "servers"]}
99
SUCCESS {}

test/resources/boltstub/v3/acquire_endpoints_no_routers.script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
!: AUTO RESET
44
!: AUTO GOODBYE
55

6-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
6+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {"address": "127.0.0.1:9001"}} {}
77
PULL_ALL
88
S: SUCCESS {"fields": ["ttl", "servers"]}
99
RECORD [9223372036854775807, [{"addresses": ["127.0.0.1:9001"],"role": "WRITE"},{"addresses": ["127.0.0.1:9001"], "role": "READ"}]]

test/resources/boltstub/v3/acquire_endpoints_no_servers.script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
!: AUTO RESET
44
!: AUTO GOODBYE
55

6-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
6+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {"address": "127.0.0.1:9001"}} {}
77
PULL_ALL
88
S: SUCCESS {"fields": ["ttl", "servers"]}
99
RECORD [9223372036854775807, []]

test/resources/boltstub/v3/acquire_endpoints_no_servers_field.script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
!: AUTO RESET
44
!: AUTO GOODBYE
55

6-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
6+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {"address": "127.0.0.1:9001"}} {}
77
PULL_ALL
88
S: SUCCESS {"fields": ["notTtl", "noServers"]}
99
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"}]]

test/resources/boltstub/v3/acquire_endpoints_no_ttl_field.script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
!: AUTO RESET
44
!: AUTO GOODBYE
55

6-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
6+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {"address": "127.0.0.1:9001"}} {}
77
PULL_ALL
88
S: SUCCESS {"fields": ["notTtl", "servers"]}
99
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"}]]

test/resources/boltstub/v3/acquire_endpoints_no_writers.script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
!: AUTO RESET
44
!: AUTO GOODBYE
55

6-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
6+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {"address": "127.0.0.1:9001"}} {}
77
PULL_ALL
88
S: SUCCESS {"fields": ["ttl", "servers"]}
99
RECORD [9223372036854775807, [{"addresses": [],"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/v3/acquire_endpoints_not_supported.script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
!: AUTO RESET
44
!: AUTO GOODBYE
55

6-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
6+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {"address": "127.0.0.1:9001"}} {}
77
C: PULL_ALL
88
S: FAILURE {"code": "Neo.ClientError.Procedure.ProcedureNotFound", "message": "blabla"}
99
S: IGNORED

test/resources/boltstub/v3/acquire_endpoints_one_router.script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
!: AUTO RESET
44
!: AUTO GOODBYE
55

6-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
6+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {"address": "127.0.0.1:9001"}} {}
77
PULL_ALL
88
S: SUCCESS {"fields": ["ttl", "servers"]}
99
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/v3/acquire_endpoints_rediscover.script

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
!: AUTO RESET
44
!: AUTO GOODBYE
55

6-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
6+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {"address": "127.0.0.1:9001"}} {}
77
PULL_ALL
88
S: SUCCESS {"fields": ["ttl", "servers"]}
99
RECORD [9223372036854775807, [{"addresses": ["127.0.0.1:9001"], "role": "ROUTE"}]]
1010
SUCCESS {}
11-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
11+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {"address": "127.0.0.1:9001"}} {}
1212
PULL_ALL
1313
S: SUCCESS {"fields": ["ttl", "servers"]}
1414
RECORD [9223372036854775807, [{"addresses": ["127.0.0.1:9004"],"role": "WRITE"}, {"addresses": ["127.0.0.1:9005"], "role": "READ"},{"addresses": ["127.0.0.1:9002","127.0.0.1:9003","127.0.0.1:9004"], "role": "ROUTE"}]]

test/resources/boltstub/v3/acquire_endpoints_self_as_reader.script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
!: AUTO RESET
44
!: AUTO GOODBYE
55

6-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
6+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {"address": "127.0.0.1:9001"}} {}
77
PULL_ALL
88
S: SUCCESS {"fields": ["ttl", "servers"]}
99
RECORD [9223372036854775807, [{"addresses": ["127.0.0.1:9008"],"role": "WRITE"}, {"addresses": ["127.0.0.1:9001","127.0.0.1:9009","127.0.0.1:9010"], "role": "READ"},{"addresses": ["127.0.0.1:9001","127.0.0.1:9011"], "role": "ROUTE"}]]

test/resources/boltstub/v3/acquire_endpoints_short_ttl.script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
!: AUTO RESET
44
!: AUTO GOODBYE
55

6-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
6+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {"address": "127.0.0.1:9001"}} {}
77
PULL_ALL
88
S: SUCCESS {"fields": ["ttl", "servers"]}
99
RECORD [0, [{"addresses": ["127.0.0.1:9007","127.0.0.1:9008"],"role": "WRITE"}, {"addresses": ["127.0.0.1:9004"], "role": "READ"},{"addresses": ["127.0.0.1:9001","127.0.0.1:9002","127.0.0.1:9003"], "role": "ROUTE"}]]

test/resources/boltstub/v3/acquire_endpoints_template.script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
!: AUTO RESET
44
!: AUTO GOODBYE
55

6-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
6+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {"address": "127.0.0.1:9001"}} {}
77
PULL_ALL
88
S: SUCCESS {"fields": ["ttl", "servers"]}
99
RECORD [9223372036854775807, [{"addresses": {{{writers}}},"role": "WRITE"}, {"addresses": {{{readers}}}, "role": "READ"},{"addresses": {{{routers}}}, "role": "ROUTE"}]]

test/resources/boltstub/v3/acquire_endpoints_three_servers_set_1.script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
!: AUTO RESET
44
!: AUTO GOODBYE
55

6-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
6+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {"address": "127.0.0.1:9002"}} {}
77
PULL_ALL
88
S: SUCCESS {"fields": ["ttl", "servers"]}
99
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"}]]

test/resources/boltstub/v3/acquire_endpoints_three_servers_set_2.script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
!: AUTO HELLO
33
!: AUTO GOODBYE
44

5-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
5+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {"address": "127.0.0.1:9001"}} {}
66
PULL_ALL
77
S: SUCCESS {"fields": ["ttl", "servers"]}
88
RECORD [9223372036854775807, [{"addresses": ["127.0.0.1:9010"],"role": "WRITE"}, {"addresses": ["127.0.0.1:9011"], "role": "READ"},{"addresses": ["127.0.0.1:9004"], "role": "ROUTE"}]]

test/resources/boltstub/v3/acquire_endpoints_three_servers_set_3.script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
!: AUTO HELLO
33
!: AUTO RESET
44

5-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
5+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {"address": "127.0.0.1:9001"}} {}
66
PULL_ALL
77
S: SUCCESS {"fields": ["ttl", "servers"]}
88
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"}]]

test/resources/boltstub/v3/acquire_endpoints_two_servers_set_1.script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
!: BOLT 3
22
!: AUTO HELLO
33

4-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
4+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {"address": "127.0.0.1:9001"}} {}
55
PULL_ALL
66
S: SUCCESS {"fields": ["ttl", "servers"]}
77
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"}]]

test/resources/boltstub/v3/acquire_endpoints_unparsable_servers.script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
!: AUTO RESET
44
!: AUTO GOODBYE
55

6-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
6+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {"address": "127.0.0.1:9001"}} {}
77
PULL_ALL
88
S: SUCCESS {"fields": ["ttl", "servers"]}
99
RECORD [9223372036854775807, [{"notAddresses": ["127.0.0.1:9001"],"memberRole": "WRITER"}, {"notAddresses": ["127.0.0.1:9002","127.0.0.1:9003"], "memberRole": "READER"},{"notAddresses": ["127.0.0.1:9001","127.0.0.1:9002"], "memberRole": "ROUTER"}]]

test/resources/boltstub/v3/acquire_endpoints_unparsable_ttl.script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
!: AUTO RESET
44
!: AUTO GOODBYE
55

6-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
6+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {"address": "127.0.0.1:9001"}} {}
77
PULL_ALL
88
S: SUCCESS {"fields": ["ttl", "servers"]}
99
RECORD [{ttl: 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/v3/acquire_endpoints_with_context.script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
!: AUTO RESET
44
!: AUTO GOODBYE
55

6-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {"policy": "my_policy", "region": "china"}} {}
6+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {"policy": "my_policy", "region": "china", "address": "127.0.0.1:9001"}} {}
77
PULL_ALL
88
S: SUCCESS {"fields": ["ttl", "servers"]}
99
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"}]]

test/resources/boltstub/v3/acquire_endpoints_zero_ttl.script

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
!: AUTO RESET
44
!: AUTO GOODBYE
55

6-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
6+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {"address": "127.0.0.1:9001"}} {}
77
PULL_ALL
88
S: SUCCESS {"fields": ["ttl", "servers"]}
99
RECORD [0, [{"addresses": ["127.0.0.1:9091","127.0.0.1:9092","127.0.0.1:9093","127.0.0.1:9999"],"role": "ROUTE"}, {"addresses": ["127.0.0.1:9999"], "role": "READ"},{"addresses": ["127.0.0.1:9999"], "role": "WRITE"}]]
@@ -12,7 +12,7 @@ C: RUN "MATCH (n) RETURN n" {} {}
1212
PULL_ALL
1313
S: SUCCESS {"fields": ["n"]}
1414
SUCCESS {}
15-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
15+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {"address": "127.0.0.1:9001"}} {}
1616
PULL_ALL
1717
S: SUCCESS {"fields": ["ttl", "servers"]}
1818
RECORD [0, [{"addresses": ["127.0.0.1:9999"],"role": "ROUTE"}, {"addresses": ["127.0.0.1:9999"], "role": "READ"},{"addresses": ["127.0.0.1:9999"], "role": "WRITE"}]]

test/resources/boltstub/v3/discover_ipv6_servers_and_read.script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
!: AUTO RESET
44
!: AUTO GOODBYE
55

6-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
6+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {"address": "127.0.0.1:9001"}} {}
77
PULL_ALL
88
S: SUCCESS {"fields": ["ttl", "servers"]}
99
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"}]]

test/resources/boltstub/v3/discover_servers_and_read.script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
!: AUTO RESET
44
!: AUTO GOODBYE
55

6-
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
6+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {"address": "127.0.0.1:9001"}} {}
77
PULL_ALL
88
S: SUCCESS {"fields": ["ttl", "servers"]}
99
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)