Skip to content

Migrate the remaining cluster tests to the new framework and remove legacy files (#2297)#3382

Open
junyeong0619 wants to merge 2 commits intovalkey-io:unstablefrom
junyeong0619:migrate
Open

Migrate the remaining cluster tests to the new framework and remove legacy files (#2297)#3382
junyeong0619 wants to merge 2 commits intovalkey-io:unstablefrom
junyeong0619:migrate

Conversation

@junyeong0619
Copy link

@junyeong0619 junyeong0619 commented Mar 19, 2026

Hi, @enjoy-binbin I've just done.
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 workflow to use the new unified test runner.

Changes:

Moved and mapped 6 test files:

03-failover-loop.tcl → failover-loop.tcl

04-resharding.tcl → resharding.tcl

12-replica-migration-2.tcl → replica-migration-2.tcl

12.1-replica-migration-3.tcl → replica-migration-3.tcl

07-replica-migration.tcl → Merged into existing replica-migration.tcl

28-cluster-shards.tcl → Merged into existing cluster-shards.tcl

Converted old framework APIs (e.g., K, RI) to new framework APIs (e.g., R, srv).

Added a process_is_alive check in cluster_util.tcl. This fixes an exception in the failover tests caused by executing ps on dead processes.

Removed the entire tests/cluster/ directory, including run.tcl, cluster.tcl, includes/, and helpers/.

Removed the deprecated runtest-cluster script.

Updated .github/workflows/daily.yml to replace ./runtest-cluster [opts] with ./runtest --cluster [opts].

I'd be happy to make any adjustments. Please let me know!

Migrate tests to use the same framework for all cluster tests.

Convert old framework APIs (K, RI, etc.) to new APIs (R, srv, etc.).

Add process_is_alive check in cluster_util.tcl to fix an exception caused by running ps on dead processes during failover tests.

Signed-off-by: Jun Yeong Kim <[email protected]>
@junyeong0619 junyeong0619 force-pushed the migrate branch 2 times, most recently from d02f291 to 1531b90 Compare March 19, 2026 06:27
…ad (valkey-io#2297)

Remove the obsolete tests/cluster/ directory (run.tcl, cluster.tcl, includes/, helpers/).

Delete the deprecated runtest-cluster script.

Update .github/workflows/daily.yml to use ./runtest --cluster instead of ./runtest-cluster.

Signed-off-by: Jun Yeong Kim <[email protected]>
@codecov
Copy link

codecov bot commented Mar 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.46%. Comparing base (6c329df) to head (dd1b2d2).
⚠️ Report is 6 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #3382      +/-   ##
============================================
- Coverage     74.55%   74.46%   -0.10%     
============================================
  Files           130      130              
  Lines         72731    72730       -1     
============================================
- Hits          54225    54155      -70     
- Misses        18506    18575      +69     

see 23 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@junyeong0619
Copy link
Author

The test-sanitizer-address CI job is failing with exit code 143 (runner OOM).

./runtest --accurate includes cluster tests by default (unit/cluster is part
of ::all_tests), so the newly migrated tests run under ASAN with full memory
overhead. The migrated tests are relatively long-running locally
(replica-migration ~325s, replica-migration-2 ~208s, replica-migration-3
~198s), and under ASAN this appears to push the runner over its memory limit
around test 87/159.

Should these long-running cluster tests be tagged to skip under ASAN, or is
there a preferred way to handle this?

@junyeong0619
Copy link
Author

Hello, @hpatro. Can you take a look at my work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant