Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testNonleaderElectionTimeoutRandomized 单测疑问 #377

Open
lygn128 opened this issue Feb 2, 2022 · 2 comments
Open

testNonleaderElectionTimeoutRandomized 单测疑问 #377

lygn128 opened this issue Feb 2, 2022 · 2 comments

Comments

@lygn128
Copy link

lygn128 commented Feb 2, 2022

企业微信截图_16438115908094

当节点 r.becomeCandidate() 应该立即发送 vote 请求吧,这时候 len(r.readMessages()) == 0 因该永远不成立吧,那么 第 306 行的单测应该永远不能通过吧? 谢谢
@Connor1996
Copy link
Collaborator

PTAL @NingLin-P

@NingLin-P
Copy link
Collaborator

The test assumes that becomeCandidate won't send VoteRequest message immediately. Instead, when r.tick() trigger new election then implementation should call becomeCandidate and sending VoteRequest message.

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

No branches or pull requests

3 participants