Skip to content

tests: fix the logic of testNonleaderElectionTimeoutRandomized in raft_paper_test.go#14273

Merged
serathius merged 1 commit intoetcd-io:mainfrom
RobertIndie:fix-test
Jul 26, 2022
Merged

tests: fix the logic of testNonleaderElectionTimeoutRandomized in raft_paper_test.go#14273
serathius merged 1 commit intoetcd-io:mainfrom
RobertIndie:fix-test

Conversation

@RobertIndie
Copy link
Copy Markdown

@RobertIndie RobertIndie commented Jul 25, 2022

In the test testNonleaderElectionTimeoutRandomized, the possible values of election timeout randomized out should be 10-19(inclusive), but the current test only tests the possible values as 11-19(inclusive), which may be incorrect here. We need to expand the scope of the tests to ensure robustness and make the logic clearer.

Signed-off-by: Zike Yang zike@apache.org

…t_paper_test.go

In the test `testNonleaderElectionTimeoutRandomized`, the possible values of election timeout randomized out should be 10-19(inclusive), but the current test only tests the possible values as 11-19(inclusive), which is incorrect here. We need to expand the scope of the tests to ensure robustness, and also to make the logic clearer.

Signed-off-by: Zike Yang <zike@apache.org>
Copy link
Copy Markdown
Member

@serathius serathius left a comment

Choose a reason for hiding this comment

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

LGTM

@serathius serathius merged commit 5fab045 into etcd-io:main Jul 26, 2022
@tbg tbg mentioned this pull request Oct 12, 2022
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants