Add behaviour scenarios for clustered TypeDB#392
Conversation
f8ec7b8 to
8cba4bc
Compare
b3382e8 to
0b81151
Compare
| Scenario: Driver can discover servers in a cluster | ||
| Then connection has 3 servers | ||
| Then connection primary server exists | ||
| Then connection get server(127.0.0.1:11729) exists |
There was a problem hiding this comment.
Was thinking about something abstract like "Nth address", but it only added headache
It will be better when we dissolve typedb-behaviour and move the scenarios into typedb-driver, where these constants exists across the whole repo
There was a problem hiding this comment.
yes - this is ok though!
| Then connection get server(127.0.0.1:11729) exists | ||
| Then connection get server(127.0.0.1:21729) exists | ||
| Then connection get server(127.0.0.1:31729) exists | ||
|
|
There was a problem hiding this comment.
just need a single newline between scenarios i think! Check what others are doing
There was a problem hiding this comment.
Nah. I enforced 2 newlines between the scenarios everywhere so we could logically split parts of each scenario with single newlines with the 3.x release, most of the files follow the same convention
| Scenario: Driver can inspect server roles | ||
| Then connection has 3 servers | ||
| Then connection servers have roles: | ||
| | primary | |
There was a problem hiding this comment.
are these ordered? Do you want to key them on port or something, or is this just a set of roles that need to satisfied one each
There was a problem hiding this comment.
No, it's just a set. The server roles are not fixed, we can only enforce it by timely restarting them, but it's too much control for these BDDs. The keys won't work here, so we just basically ensure the counts
f9b4618 to
88a5ded
Compare
## Usage and product changes Implement behaviour steps declaration for clustering features of TypeDB Drivers: * raft status retrieval; * different consistency modes for read and write operations. These tests do not test server restarts due to design complications. ## Implementation
f3dfda7 to
d249cf2
Compare
Usage and product changes
Add BDD tests for cluster driver support.
driver/cluster.feature): server discovery, roles, terms, single-server connection, server routing modes, failover retries configuration. Expected to run against a 3-node cluster.driver/connection.feature):request_timeout_millisconfiguration and timeout failure.user.feature): "User does not exist" → "User not found" to match the error message pattern.Implementation
New BDD steps requiring driver implementations:
connection has {int} server(s)— query server list, assert countconnection primary server exists— find server with primary roleconnection get server({address}) exists / does not exist— lookup by addressconnection get server({address}) has term— assert term is presentconnection servers have roles:— data table of expected rolesconnection opens to single server with default authentication— connect via single addressset operation server routing to: {routing}— configureautoordirect(address)routingset driver option {option} to: {value}— configureprimary_failover_retries,request_timeout_millis