Skip to content

Commit ff80b2d

Browse files
Migrate the remaining cluster tests to the new framework and remove legacy files (valkey-io#2297) (valkey-io#3382)
Migrated the remaining cluster tests to tests/unit/cluster/ to use the same framework for all cluster tests. Cleaned up the obsolete cluster test framework files and updated the CI workflows to use the new unified test runner. Changes: Moved and mapped 6 test files: - 03-failover-loop.tcl → Merged into existing failover.tcl - 04-resharding.tcl → resharding.tcl - 12-replica-migration-2.tcl + 12.1-replica-migration-3.tcl → replica-migration-slow.tcl - 07-replica-migration.tcl → Merged into existing replica-migration.tcl - 28-cluster-shards.tcl → Merged into existing cluster-shards.tcl Other changes: - Converted old framework APIs (e.g., K, RI) to new framework APIs (e.g., R, srv) - Added process_is_alive check in cluster_util.tcl to fix an exception in failover tests caused by executing ps on dead processes - Heavy tests (resharding, replica-migration-slow) marked with slow tag and wrapped in run_solo to prevent resource contention in sanitizer environments - replica-migration-slow marked with valgrind:skip tag since it is very slow - Removed the entire tests/cluster/ directory including run.tcl, cluster.tcl, includes/, and helpers/ - Kept runtest-cluster as a wrapper script (exec ./runtest --cluster "$@") - Removed ./runtest-cluster calls from .github/workflows/daily.yml as cluster tests are now included in ./runtest Closes valkey-io#2297. Signed-off-by: Jun Yeong Kim <junyeonggim5@gmail.com> Signed-off-by: Binbin <binloveplay1314@qq.com> Co-authored-by: Binbin <binloveplay1314@qq.com>
1 parent 6dbb7f8 commit ff80b2d

20 files changed

Lines changed: 724 additions & 1350 deletions

.github/workflows/daily.yml

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,6 @@ jobs:
125125
- name: sentinel tests
126126
if: true && !contains(github.event.inputs.skiptests, 'sentinel')
127127
run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}}
128-
- name: cluster tests
129-
if: true && !contains(github.event.inputs.skiptests, 'cluster')
130-
run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}}
131128
- name: unittest
132129
if: true && !contains(github.event.inputs.skiptests, 'unittest')
133130
run: |
@@ -211,9 +208,6 @@ jobs:
211208
- name: sentinel tests
212209
if: true && !contains(github.event.inputs.skiptests, 'sentinel')
213210
run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}}
214-
- name: cluster tests
215-
if: true && !contains(github.event.inputs.skiptests, 'cluster')
216-
run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}}
217211
- name: unittest
218212
if: true && !contains(github.event.inputs.skiptests, 'unittest')
219213
run: |
@@ -276,9 +270,6 @@ jobs:
276270
- name: sentinel tests
277271
if: true && !contains(github.event.inputs.skiptests, 'sentinel')
278272
run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}}
279-
- name: cluster tests
280-
if: true && !contains(github.event.inputs.skiptests, 'cluster')
281-
run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}}
282273
- name: unittest
283274
if: true && !contains(github.event.inputs.skiptests, 'unittest')
284275
run: |
@@ -334,9 +325,6 @@ jobs:
334325
- name: sentinel tests
335326
if: true && !contains(github.event.inputs.skiptests, 'sentinel')
336327
run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}}
337-
- name: cluster tests
338-
if: true && !contains(github.event.inputs.skiptests, 'cluster')
339-
run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}}
340328
test-ubuntu-no-malloc-usable-size:
341329
runs-on: ubuntu-latest
342330
if: |
@@ -384,9 +372,6 @@ jobs:
384372
- name: sentinel tests
385373
if: true && !contains(github.event.inputs.skiptests, 'sentinel')
386374
run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}}
387-
- name: cluster tests
388-
if: true && !contains(github.event.inputs.skiptests, 'cluster')
389-
run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}}
390375
test-ubuntu-32bit:
391376
runs-on: ubuntu-latest
392377
if: |
@@ -457,9 +442,6 @@ jobs:
457442
- name: sentinel tests
458443
if: true && !contains(github.event.inputs.skiptests, 'sentinel')
459444
run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}}
460-
- name: cluster tests
461-
if: true && !contains(github.event.inputs.skiptests, 'cluster')
462-
run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}}
463445
- name: unittest
464446
if: true && !contains(github.event.inputs.skiptests, 'unittest')
465447
run: |
@@ -522,10 +504,6 @@ jobs:
522504
if: true && !contains(github.event.inputs.skiptests, 'sentinel')
523505
run: |
524506
./runtest-sentinel --tls ${{github.event.inputs.cluster_test_args}}
525-
- name: cluster tests
526-
if: true && !contains(github.event.inputs.skiptests, 'cluster')
527-
run: |
528-
./runtest-cluster --tls ${{github.event.inputs.cluster_test_args}}
529507
test-ubuntu-tls-no-tls:
530508
runs-on: ubuntu-latest
531509
if: |
@@ -578,10 +556,6 @@ jobs:
578556
if: true && !contains(github.event.inputs.skiptests, 'sentinel')
579557
run: |
580558
./runtest-sentinel ${{github.event.inputs.cluster_test_args}}
581-
- name: cluster tests
582-
if: true && !contains(github.event.inputs.skiptests, 'cluster')
583-
run: |
584-
./runtest-cluster ${{github.event.inputs.cluster_test_args}}
585559
test-ubuntu-io-threads:
586560
runs-on: ubuntu-latest
587561
if: |
@@ -623,9 +597,6 @@ jobs:
623597
- name: test
624598
if: true && !contains(github.event.inputs.skiptests, 'valkey')
625599
run: ./runtest --io-threads --accurate --verbose --tags network --dump-logs ${{github.event.inputs.test_args}}
626-
- name: cluster tests
627-
if: true && !contains(github.event.inputs.skiptests, 'cluster')
628-
run: ./runtest-cluster --io-threads ${{github.event.inputs.cluster_test_args}}
629600
test-ubuntu-tls-io-threads:
630601
runs-on: ubuntu-latest
631602
if: |
@@ -670,10 +641,6 @@ jobs:
670641
if: true && !contains(github.event.inputs.skiptests, 'valkey')
671642
run: |
672643
./runtest --io-threads --tls --accurate --verbose --tags network --dump-logs ${{github.event.inputs.test_args}}
673-
- name: cluster tests
674-
if: true && !contains(github.event.inputs.skiptests, 'cluster')
675-
run: |
676-
./runtest-cluster --io-threads --tls ${{github.event.inputs.cluster_test_args}}
677644
test-ubuntu-reclaim-cache:
678645
runs-on: ubuntu-latest
679646
if: |
@@ -991,9 +958,6 @@ jobs:
991958
- name: sentinel tests
992959
if: true && !contains(github.event.inputs.skiptests, 'sentinel')
993960
run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}}
994-
- name: cluster tests
995-
if: true && !contains(github.event.inputs.skiptests, 'cluster')
996-
run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}}
997961
- name: unittest
998962
if: true && !contains(github.event.inputs.skiptests, 'unittest')
999963
run: |
@@ -1129,9 +1093,6 @@ jobs:
11291093
- name: sentinel tests
11301094
if: true && !contains(github.event.inputs.skiptests, 'sentinel')
11311095
run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}}
1132-
- name: cluster tests
1133-
if: true && !contains(github.event.inputs.skiptests, 'cluster')
1134-
run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}}
11351096
- name: unittest
11361097
if: true && !contains(github.event.inputs.skiptests, 'unittest')
11371098
run: |
@@ -1263,9 +1224,6 @@ jobs:
12631224
- name: sentinel tests
12641225
if: true && !contains(github.event.inputs.skiptests, 'sentinel')
12651226
run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}}
1266-
- name: cluster tests
1267-
if: true && !contains(github.event.inputs.skiptests, 'cluster')
1268-
run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}}
12691227
- name: unittest
12701228
if: true && !contains(github.event.inputs.skiptests, 'unittest')
12711229
run: |
@@ -1324,9 +1282,6 @@ jobs:
13241282
- name: sentinel tests
13251283
if: true && !contains(github.event.inputs.skiptests, 'sentinel')
13261284
run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}}
1327-
- name: cluster tests
1328-
if: true && !contains(github.event.inputs.skiptests, 'cluster')
1329-
run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}}
13301285
test-rpm-distros-jemalloc:
13311286
if: |
13321287
(github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' ||
@@ -1399,9 +1354,6 @@ jobs:
13991354
- name: sentinel tests
14001355
if: true && !contains(github.event.inputs.skiptests, 'sentinel')
14011356
run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}}
1402-
- name: cluster tests
1403-
if: true && !contains(github.event.inputs.skiptests, 'cluster')
1404-
run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}}
14051357
test-rpm-distros-tls-module:
14061358
if: |
14071359
(github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' ||
@@ -1479,10 +1431,6 @@ jobs:
14791431
if: true && !contains(github.event.inputs.skiptests, 'sentinel')
14801432
run: |
14811433
./runtest-sentinel ${{github.event.inputs.cluster_test_args}}
1482-
- name: cluster tests
1483-
if: true && !contains(github.event.inputs.skiptests, 'cluster')
1484-
run: |
1485-
./runtest-cluster --tls-module ${{github.event.inputs.cluster_test_args}}
14861434
test-rpm-distros-tls-module-no-tls:
14871435
if: |
14881436
(github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' ||
@@ -1555,10 +1503,6 @@ jobs:
15551503
if: true && !contains(github.event.inputs.skiptests, 'sentinel')
15561504
run: |
15571505
./runtest-sentinel ${{github.event.inputs.cluster_test_args}}
1558-
- name: cluster tests
1559-
if: true && !contains(github.event.inputs.skiptests, 'cluster')
1560-
run: |
1561-
./runtest-cluster ${{github.event.inputs.cluster_test_args}}
15621506
test-macos-latest:
15631507
runs-on: macos-latest
15641508
if: |
@@ -1676,9 +1620,6 @@ jobs:
16761620
- run: cd libbacktrace && ./configure && make && sudo make install
16771621
- name: make
16781622
run: make SERVER_CFLAGS='-Werror' USE_LIBBACKTRACE=yes
1679-
- name: cluster tests
1680-
if: true && !contains(github.event.inputs.skiptests, 'cluster')
1681-
run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}}
16821623
build-old-macos-versions:
16831624
strategy:
16841625
fail-fast: false
@@ -1806,9 +1747,6 @@ jobs:
18061747
- name: sentinel tests
18071748
if: true && !contains(github.event.inputs.skiptests, 'sentinel')
18081749
run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}}
1809-
- name: cluster tests
1810-
if: true && !contains(github.event.inputs.skiptests, 'cluster')
1811-
run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}}
18121750
test-alpine-libc-malloc:
18131751
runs-on: ubuntu-latest
18141752
if: |
@@ -1859,9 +1797,6 @@ jobs:
18591797
- name: sentinel tests
18601798
if: true && !contains(github.event.inputs.skiptests, 'sentinel')
18611799
run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}}
1862-
- name: cluster tests
1863-
if: true && !contains(github.event.inputs.skiptests, 'cluster')
1864-
run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}}
18651800
reply-schemas-validator:
18661801
runs-on: ubuntu-latest
18671802
timeout-minutes: 1440
@@ -1909,9 +1844,6 @@ jobs:
19091844
- name: sentinel tests
19101845
if: true && !contains(github.event.inputs.skiptests, 'sentinel')
19111846
run: ./runtest-sentinel --log-req-res --dont-clean --force-resp3 ${{github.event.inputs.cluster_test_args}}
1912-
- name: cluster tests
1913-
if: true && !contains(github.event.inputs.skiptests, 'cluster')
1914-
run: ./runtest-cluster --log-req-res --dont-clean --force-resp3 ${{github.event.inputs.cluster_test_args}}
19151847
- name: Install Python dependencies
19161848
uses: py-actions/py-dependency-install@30aa0023464ed4b5b116bd9fbdab87acf01a484e # v4.1.0
19171849
with:

runtest-cluster

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,2 @@
11
#!/bin/sh
2-
TCL_VERSIONS="8.5 8.6 9.0"
3-
TCLSH=""
4-
5-
for VERSION in $TCL_VERSIONS; do
6-
TCL=`which tclsh$VERSION 2>/dev/null` && TCLSH=$TCL
7-
done
8-
9-
if [ -z $TCLSH ]
10-
then
11-
echo "You need tcl 8.5 or newer in order to run the Valkey Cluster test"
12-
exit 1
13-
fi
14-
$TCLSH tests/cluster/run.tcl $*
2+
exec ./runtest --cluster "$@"

0 commit comments

Comments
 (0)