Skip to content

Extend test helper wait_for_cluster_propagation to support ignoring certain node - #3069

Merged
enjoy-binbin merged 3 commits into
valkey-io:unstablefrom
zhijun42:refactor-replica-migration-tests-v2
Feb 8, 2026
Merged

enjoy-binbin merged 3 commits into
valkey-io:unstablefrom
zhijun42:refactor-replica-migration-tests-v2

Conversation

@zhijun42

@zhijun42 zhijun42 commented Jan 17, 2026 •

Copy link
Copy Markdown
Contributor

Enhanced the popular helper wait_for_cluster_propagation to support the scenario where we intentionally stop a server and wait for the other nodes to converge without it.

@codecov

codecov Bot commented Jan 17, 2026 •

Copy link
Copy Markdown

Codecov Report

âś… All modified and coverable lines are covered by tests.
âś… Project coverage is 74.37%. Comparing base (6865f0a) to head (3977938).
⚠️ Report is 66 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #3069      +/-   ##
============================================
+ Coverage     74.22%   74.37%   +0.14%     
============================================
  Files           129      129              
  Lines         70986    71011      +25     
============================================
+ Hits          52691    52812     +121     
+ Misses        18295    18199      -96     

see 36 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.

@enjoy-binbin enjoy-binbin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why we bother to do this? These test cases are very specific, and while sharing code with other cases reduces the diff, but it also make each individual case less straightforward.

I want to make each case as simple as possible (even though it adds more code, it's all simple code), so that people can directly copy the code to another fork to verify the fix without having to across multiple function. That is, i don't mind copy the duplicate code. But since it is all code that i wrote so i might be too xxx

@zhijun42

Copy link
Copy Markdown
Contributor Author

why we bother to do this?

I was trying to add a new test case but didn't want to copy-paste all the way.

Yeah, you made a good point about the pros of duplicating simple code. Tests generally have [setup -> execution -> assertion] flow, and my extracting setup + execution into shared helper functions could hurt the readability.

You also made a good point that you've been the single person maintaining this test file, so it would be nice to hear other folks' opinions if possible (cc @PingXie @zuiderkwast since you reviewed the original implementation).

And perhaps we can take a step back and reach consensus on the middle ground. I think my enhancement to the wait_for_cluster_propagation helper in tests/support/cluster_util.tcl is pretty useful. This helper has been widely used across Valkey test suite, and we can also use it here without hurting readability.

@zuiderkwast zuiderkwast added the run-extra-tests Run extra tests on this PR (Runs all tests from daily except valgrind and RESP) label Jan 20, 2026

@zuiderkwast zuiderkwast left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mostly agree with Binbin that simple explicit code is better in test cases.

I think wait_for_cluster_propagation_except_node can be a useful abstraction though.

Comment thread tests/support/cluster_util.tcl Resolved
Comment thread tests/support/cluster_util.tcl Resolved
Comment thread tests/support/cluster_util.tcl Resolved
Comment thread tests/support/cluster_util.tcl Resolved
Comment thread tests/support/cluster_util.tcl Resolved
@github-actions github-actions Bot removed the run-extra-tests Run extra tests on this PR (Runs all tests from daily except valgrind and RESP) label Jan 20, 2026
Signed-off-by: Zhijun <dszhijun@gmail.com>
@zhijun42
zhijun42 force-pushed the refactor-replica-migration-tests-v2 branch from 627a599 to 36d1e6a Compare January 21, 2026 04:07
Signed-off-by: Zhijun <dszhijun@gmail.com>
Signed-off-by: Zhijun <dszhijun@gmail.com>
@zhijun42 zhijun42 changed the title Cluster: Consolidate and enhance the replica-migration test Cluster: Extend test helper wait_for_cluster_propagation to support ignoring certain node Feb 8, 2026
@zhijun42

zhijun42 commented Feb 8, 2026

Copy link
Copy Markdown
Contributor Author

I've reduced the PR scope to just extend the helper function wait_for_cluster_propagation and the changes are minimal. Are they good to go?

@enjoy-binbin enjoy-binbin changed the title Cluster: Extend test helper wait_for_cluster_propagation to support ignoring certain node Extend test helper wait_for_cluster_propagation to support ignoring certain node Feb 8, 2026
@enjoy-binbin
enjoy-binbin merged commit dbdc3d9 into valkey-io:unstable Feb 8, 2026
24 checks passed
enjoy-binbin added a commit to enjoy-binbin/valkey that referenced this pull request Feb 9, 2026
…noring certain node (valkey-io#3069)"

This reverts commit dbdc3d9.

Clearly, it doesn't handle TLS-related aspects, which caused it
to fail some TLS tests. Furthermore, this check is also incorrect
under the "announce client port" setting.

There isn't much value in doing this and there is no need to extend
the helper function.
enjoy-binbin added a commit to enjoy-binbin/valkey that referenced this pull request Feb 9, 2026
…noring certain node (valkey-io#3069)"

This reverts commit dbdc3d9.

Clearly, it doesn't handle TLS-related aspects, which caused it
to fail some TLS tests. Furthermore, this check is also incorrect
under the "announce client port" setting.

There isn't much value in doing this and there is no need to extend
the helper function.

Signed-off-by: Binbin <binloveplay1314@qq.com>
enjoy-binbin added a commit that referenced this pull request Feb 9, 2026
…noring certain node (#3069)" (#3176)

This reverts #3069 commit dbdc3d9.

Clearly, it doesn't handle TLS-related aspects, which caused it
to fail some TLS tests. Furthermore, this check is also incorrect
under the "announce client port" setting.

There isn't much value in doing this and there is no need to extend
the helper function.

Signed-off-by: Binbin <binloveplay1314@qq.com>
harrylin98 pushed a commit to harrylin98/valkey_forked that referenced this pull request Feb 19, 2026
…ertain node (valkey-io#3069)

Enhanced the popular helper `wait_for_cluster_propagation` to support
the scenario where we intentionally stop a server and wait for the other
nodes to converge without it.

Signed-off-by: Zhijun <dszhijun@gmail.com>
harrylin98 pushed a commit to harrylin98/valkey_forked that referenced this pull request Feb 19, 2026
…noring certain node (valkey-io#3069)" (valkey-io#3176)

This reverts valkey-io#3069 commit dbdc3d9.

Clearly, it doesn't handle TLS-related aspects, which caused it
to fail some TLS tests. Furthermore, this check is also incorrect
under the "announce client port" setting.

There isn't much value in doing this and there is no need to extend
the helper function.

Signed-off-by: Binbin <binloveplay1314@qq.com>
hpatro pushed a commit to hpatro/valkey that referenced this pull request Mar 5, 2026
…ertain node (valkey-io#3069)

Enhanced the popular helper `wait_for_cluster_propagation` to support
the scenario where we intentionally stop a server and wait for the other
nodes to converge without it.

Signed-off-by: Zhijun <dszhijun@gmail.com>
Signed-off-by: Harkrishn Patro <bunty.hari@gmail.com>
hpatro pushed a commit to hpatro/valkey that referenced this pull request Mar 5, 2026
…noring certain node (valkey-io#3069)" (valkey-io#3176)

This reverts valkey-io#3069 commit dbdc3d9.

Clearly, it doesn't handle TLS-related aspects, which caused it
to fail some TLS tests. Furthermore, this check is also incorrect
under the "announce client port" setting.

There isn't much value in doing this and there is no need to extend
the helper function.

Signed-off-by: Binbin <binloveplay1314@qq.com>
Signed-off-by: Harkrishn Patro <bunty.hari@gmail.com>
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.

3 participants