Repository navigation
Extend test helper wait_for_cluster_propagation to support ignoring certain node - #3069
Conversation
Codecov Reportâś… All modified and coverable lines are covered by tests. 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 🚀 New features to boost your workflow:
|
enjoy-binbin
left a comment
There was a problem hiding this comment.
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
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 |
zuiderkwast
left a comment
There was a problem hiding this comment.
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.
Signed-off-by: Zhijun <dszhijun@gmail.com>
627a599 to
36d1e6a
Compare
Signed-off-by: Zhijun <dszhijun@gmail.com>
Signed-off-by: Zhijun <dszhijun@gmail.com>
|
I've reduced the PR scope to just extend the helper function |
…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.
…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>
…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>
…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>
…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>
…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>
…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>
Enhanced the popular helper
wait_for_cluster_propagationto support the scenario where we intentionally stop a server and wait for the other nodes to converge without it.