80 lines
2.8 KiB
YAML
80 lines
2.8 KiB
YAML
parallel: true
|
|
tests:
|
|
|
|
- name: large blob values replicate to standby
|
|
# Cluster replication is not yet implemented in Doltgres, so this test is
|
|
# skipped. The cluster config and the large-blob schema/data (LONGBLOB ->
|
|
# bytea) are translated faithfully so this can be enabled once replication
|
|
# lands. The ASCII payloads are turned into bytea with convert_to(...,'UTF8'),
|
|
# which preserves the byte length asserted by LENGTH().
|
|
skip: "cluster/remotesapi replication not yet implemented in Doltgres"
|
|
multi_repos:
|
|
- name: server1
|
|
with_files:
|
|
- name: server.yaml
|
|
contents: |
|
|
log_level: trace
|
|
listener:
|
|
host: 0.0.0.0
|
|
cluster:
|
|
standby_remotes:
|
|
- name: standby
|
|
remote_url_template: http://localhost:{{get_port "server2_cluster"}}/{database}
|
|
bootstrap_role: primary
|
|
bootstrap_epoch: 1
|
|
remotesapi:
|
|
port: {{get_port "server1_cluster"}}
|
|
server:
|
|
args: ["--config", "server.yaml"]
|
|
dynamic_port: server1
|
|
- name: server2
|
|
with_files:
|
|
- name: server.yaml
|
|
contents: |
|
|
log_level: trace
|
|
listener:
|
|
host: 0.0.0.0
|
|
cluster:
|
|
standby_remotes:
|
|
- name: standby
|
|
remote_url_template: http://localhost:{{get_port "server1_cluster"}}/{database}
|
|
bootstrap_role: standby
|
|
bootstrap_epoch: 1
|
|
remotesapi:
|
|
port: {{get_port "server2_cluster"}}
|
|
server:
|
|
args: ["--config", "server.yaml"]
|
|
dynamic_port: server2
|
|
connections:
|
|
- on: server1
|
|
queries:
|
|
- exec: "SET dolt_cluster_ack_writes_timeout_secs = 10"
|
|
- exec: 'CREATE DATABASE repo1'
|
|
- exec: 'USE repo1'
|
|
- exec: |
|
|
CREATE TABLE large_blob (
|
|
id BIGINT PRIMARY KEY,
|
|
data BYTEA
|
|
)
|
|
- exec: "INSERT INTO large_blob VALUES (1, convert_to(REPEAT('abcdefghijklmnopqrst', 1250), 'UTF8'))"
|
|
- exec: "INSERT INTO large_blob VALUES (2, convert_to(REPEAT('ABCDEFGHIJKLMNOPQRST', 1250), 'UTF8'))"
|
|
- exec: "INSERT INTO large_blob VALUES (3, convert_to(REPEAT('01234567890123456789', 1250), 'UTF8'))"
|
|
- exec: "INSERT INTO large_blob VALUES (4, convert_to(REPEAT('zyxwvutsrqponmlkjihg', 1250), 'UTF8'))"
|
|
- exec: "INSERT INTO large_blob VALUES (5, convert_to(REPEAT('fedcba9876543210FEDC', 1250), 'UTF8'))"
|
|
- query: "SELECT COUNT(*) AS count FROM large_blob WHERE LENGTH(data) = 25000"
|
|
result:
|
|
columns: ["count"]
|
|
rows: [["5"]]
|
|
- on: server2
|
|
retry_attempts: 100
|
|
queries:
|
|
- exec: 'USE repo1'
|
|
- query: "SELECT COUNT(*) AS count FROM large_blob"
|
|
result:
|
|
columns: ["count"]
|
|
rows: [["5"]]
|
|
- query: "SELECT COUNT(*) AS count FROM large_blob WHERE LENGTH(data) = 25000"
|
|
result:
|
|
columns: ["count"]
|
|
rows: [["5"]]
|