Imported from gencau/test-practices-agent-configurations (
dataset/repos/pingcap§tiflash/tests/AGENTS.md). Install upstream withnpx skills add gencau/test-practices-agent-configurations --skill tests. Copyright stays with the author.
TiFlash Tests Guide
This document describes how to run tests under tests/.
Scope
- Integration tests under
tests/fullstack-test*. - Mock tests under
tests/delta-merge-test. - Next-gen integration tests under
tests/fullstack-test-next-gen. - Unit test workflows are described in the repository root
AGENTS.md.
Build Prerequisite
- Build a TiFlash binary before running tests (for example,
cmake --workflow --preset dev).
Test Suites
Fullstack Integration Tests
- Prerequisites: A running TiDB/PD/TiKV cluster with a TiFlash node.
- Cluster setup: See
tests/README.mdfortiup playgroundguidance. - Run a directory:
tidb_port=4000 storage_port=9000 ./run-test.sh <test-dir> test-diris undertests/fullstack-test*(for example,fullstack-test/ddl).
Delta-Merge Mock Tests
- No TiDB cluster needed. Run a standalone TiFlash server instead.
- Example:
export TIFLASH_PORT=9000 /path/to/tiflash server -- --path /tmp/tiflash/data --tcp_port ${TIFLASH_PORT} storage_port=${TIFLASH_PORT} verbose=true ./run-test.sh delta-merge-test
Fullstack Next-Gen Tests
- Requires a disaggregated TiFlash cluster and access to PingCAP internal docker images.
- Build with
-DENABLE_NEXT_GEN=ON, then run fromtests/fullstack-test-next-gen:ENABLE_NEXT_GEN=true ./run.sh - See
tests/README.mdfor the full build and docker compose steps.
Notes
- Some tests assume local binaries or shared libraries built from this repository.
- If ports or topology differ, override with environment variables documented in the test directory.