Constants, comments, CI fixes, dead code clean-up (#21)

* constants

* server.rs docs

* client.rs comments

* dead code; comments

* comment

* query cancellation comments

* remove unnecessary cast

* move db setup up one step

* query cancellation test

* new line; good night
This commit is contained in:
Lev Kokotov
2022-02-15 22:45:45 -08:00
committed by GitHub
parent bb84dcee64
commit 7b0ceefb96
8 changed files with 208 additions and 115 deletions

View File

@@ -3,12 +3,12 @@
set -e
set -o xtrace
psql -e -h 127.0.0.1 -p 5432 -U postgres -f tests/sharding/query_routing_setup.sql
./target/debug/pgcat &
sleep 1
psql -e -h 127.0.0.1 -p 5432 -U postgres -f tests/sharding/query_routing_setup.sql
# Setup PgBench
pgbench -i -h 127.0.0.1 -p 6432
@@ -18,6 +18,13 @@ pgbench -h 127.0.0.1 -p 6432 -t 500 -c 2 --protocol simple
# Extended protocol
pgbench -h 127.0.0.1 -p 6432 -t 500 -c 2 --protocol extended
# COPY TO STDOUT test
psql -h 127.0.0.1 -p 6432 -c 'COPY (SELECT * FROM pgbench_accounts LIMIT 15) TO STDOUT;' > /dev/null
# Query cancellation test
(psql -h 127.0.0.1 -p 6432 -c 'SELECT pg_sleep(5)' || true) &
killall psql -s SIGINT
# Sharding insert
psql -e -h 127.0.0.1 -p 6432 -f tests/sharding/query_routing_test_insert.sql
@@ -29,3 +36,6 @@ psql -e -h 127.0.0.1 -p 6432 -f tests/sharding/query_routing_test_primary_replic
# Attempt clean shut down
killall pgcat -s SIGINT
# Allow for graceful shutdown
sleep 1