Skip to content

Instantly share code, notes, and snippets.

@filimonov
Created August 5, 2019 12:28
Show Gist options
  • Save filimonov/316b0debf37ef8332b2e0653acc4dcd1 to your computer and use it in GitHub Desktop.
Save filimonov/316b0debf37ef8332b2e0653acc4dcd1 to your computer and use it in GitHub Desktop.
test timeouts clickhouse issue #5317
<yandex>
<remote_servers>
<test_cluster>
<shard>
<internal_replication>false</internal_replication>
<replica>
<host>ch1</host>
<port>9000</port>
</replica>
<replica>
<host>ch2</host>
<port>9000</port>
</replica>
</shard>
</test_cluster>
</remote_servers>
</yandex>
version: '2.2'
services:
ch1:
image: yandex/clickhouse-server
hostname: ooo
volumes:
- ./cluster.xml:/etc/clickhouse-server/config.d/cluster.xml
#- "${CLICKHOUSE_TESTS_SERVER_BIN_PATH:-/usr/bin/clickhouse}:/usr/bin/clickhouse"
# uncomment that to use custom binary (own build)
ch2:
image: yandex/clickhouse-server
hostname: XXX
volumes:
- ./cluster.xml:/etc/clickhouse-server/config.d/cluster.xml
#- "${CLICKHOUSE_TESTS_SERVER_BIN_PATH:-/usr/bin/clickhouse}:/usr/bin/clickhouse"
docker-compose up -d
sleep 2
docker-compose exec ch1 clickhouse-client --query="CREATE TABLE test as system.one Engine=Distributed('test_cluster', 'system', 'one');"
docker-compose exec ch1 bash -c 'while true; do clickhouse-client --query="SELECT now(), hostName() FROM test" --prefer_localhost_replica=0; done'
# after that in another console:
docker-compose stop ch2
docker-compose start ch2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment