Module util

Source

ConstantsΒ§

PORT_CHECK_INTERVAL πŸ”’
Check port every 0.1 second.
PROGRAM

FunctionsΒ§

check_port
Spin-waiting a socket address is available, or timeout. Returns whether the addr is up.
decompress πŸ”’
download_files πŸ”’
get_binary_dir
get_case_dir
Get the dir of test cases. This function only works when the runner is run under the project’s dir because it depends on some envs set by cargo.
get_random_port
Get a random available port by binding to port 0
get_workspace_root
Get the dir that contains workspace manifest (the top-level Cargo.toml).
http_proxy πŸ”’
https_proxy πŸ”’
maybe_pull_binary
Pull the binary if it does not exist and pull_version_on_need is true.
pull_binary
Use curl to download the binary from the release page.
setup_etcd
Set up a standalone etcd in docker.
setup_mysql
Set up a MySql server in docker.
setup_pg
Set up a PostgreSQL server in docker.
setup_wal
Start kafka cluster if needed. Config file is conf/kafka-cluster.yml.
sqlness_conf_path
Get the path of sqlness config dir tests/conf.
stop_rm_etcd
Stop and remove the etcd container
teardown_wal
Stop kafka cluster if needed. Config file is conf/kafka-cluster.yml.