Skip to content

Commit f0dad57

Browse files
committed
fix
1 parent 0f3c937 commit f0dad57

File tree

5 files changed

+62
-9
lines changed

5 files changed

+62
-9
lines changed

.github/workflows/ci.yml

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ jobs:
5050
- name: unit test
5151
run: make unit-test
5252

53-
integration-test:
53+
# TODO: Integeration test are split into two jobs because APIV2 is not implemented yet,
54+
# so we can't run both tests in the same cluster.
55+
# Once APIV2 is implemented, we can run both tests in the same cluster.
56+
raw-integration-test:
5457
name: integration test
5558
env:
5659
CARGO_INCREMENTAL: 0
@@ -70,7 +73,7 @@ jobs:
7073
run: |
7174
# use latest stable version
7275
~/.tiup/bin/tiup install tikv pd
73-
~/.tiup/bin/tiup playground --mode tikv-slim --kv 3 --without-monitor --kv.config config/tikv.toml --pd.config config/pd.toml &
76+
make tiup-v1ttl
7477
while :; do
7578
echo "waiting cluster to be ready"
7679
[[ "$(curl -I http://127.0.0.1:2379/pd/api/v1/regions 2>/dev/null | head -n 1 | cut -d$' ' -f2)" -ne "405" ]] || break
@@ -79,4 +82,35 @@ jobs:
7982
- name: Install latest nextest release
8083
uses: taiki-e/install-action@nextest
8184
- name: integration test
82-
run: MULTI_REGION=1 make integration-test
85+
run: MULTI_REGION=1 make raw-integration-test
86+
87+
txn-integration-test:
88+
name: integration test
89+
env:
90+
CARGO_INCREMENTAL: 0
91+
runs-on: ubuntu-latest
92+
steps:
93+
- uses: actions/checkout@v4
94+
- name: Install Protoc
95+
uses: arduino/setup-protoc@v1
96+
with:
97+
version: '3.x'
98+
repo-token: ${{ secrets.GITHUB_TOKEN }}
99+
- name: Rust Cache
100+
uses: Swatinem/rust-cache@v2
101+
- name: install tiup
102+
run: curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sh
103+
- name: start tiup playground
104+
run: |
105+
# use latest stable version
106+
~/.tiup/bin/tiup install tikv pd
107+
make tiup
108+
while :; do
109+
echo "waiting cluster to be ready"
110+
[[ "$(curl -I http://127.0.0.1:2379/pd/api/v1/regions 2>/dev/null | head -n 1 | cut -d$' ' -f2)" -ne "405" ]] || break
111+
sleep 1
112+
done
113+
- name: Install latest nextest release
114+
uses: taiki-e/install-action@nextest
115+
- name: integration test
116+
run: MULTI_REGION=1 make txn-integration-test

Makefile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,22 @@ check: generate
2222
unit-test: generate
2323
cargo nextest run --all --no-default-features
2424

25-
integration-test: generate
26-
cargo test txn_ --all ${INTEGRATION_TEST_ARGS} -- --nocapture
25+
integration-test-raw: generate
2726
cargo test raw_ --all ${INTEGRATION_TEST_ARGS} -- --nocapture
28-
cargo test misc_ --all ${INTEGRATION_TEST_ARGS} -- --nocapture
27+
28+
integration-test-txn: generate
29+
cargo test txn_ --all ${INTEGRATION_TEST_ARGS} -- --nocapture
2930

3031
test: unit-test integration-test
3132

3233
doc:
3334
cargo doc --workspace --exclude tikv-client-proto --document-private-items --no-deps
3435

3536
tiup:
36-
tiup playground nightly --mode tikv-slim --kv 3 --without-monitor --kv.config $(shell pwd)/config/tikv.toml --pd.config $(shell pwd)/config/pd.toml &
37+
tiup playground nightly --mode tikv-slim --kv 3 --without-monitor --kv.config $(shell pwd)/config/tikv-v1.toml --pd.config $(shell pwd)/config/pd.toml &
38+
39+
tiup-v1ttl:
40+
tiup playground nightly --mode tikv-slim --kv 3 --without-monitor --kv.config $(shell pwd)/config/tikv-v1ttl.toml --pd.config $(shell pwd)/config/pd.toml &
3741

3842
all: generate check doc test
3943

config/tikv-v1.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[coprocessor]
2+
region-max-keys = 10
3+
region-split-keys = 7
4+
batch-split-limit = 100
5+
6+
[raftstore]
7+
region-split-check-diff = "1B"
8+
pd-heartbeat-tick-interval = "2s"
9+
pd-store-heartbeat-tick-interval = "5s"
10+
split-region-check-tick-interval = "1s"
11+
raft-entry-max-size = "1MB"
12+
13+
[rocksdb]
14+
max-open-files = 10000
15+
16+
[raftdb]
17+
max-open-files = 10000

config/tikv.toml renamed to config/tikv-v1ttl.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,4 @@ max-open-files = 10000
1717
max-open-files = 10000
1818

1919
[storage]
20-
api-version = 2
2120
enable-ttl = true

tests/integration_tests.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
//! Test names should begin with one of the following:
66
//! 1. txn_
77
//! 2. raw_
8-
//! 3. misc_
98
//!
109
//! We make use of the convention to control the order of tests in CI, to allow
1110
//! transactional and raw tests to coexist, since transactional requests have

0 commit comments

Comments
 (0)