goraft / raft

UNMAINTAINED: A Go implementation of the Raft distributed consensus protocol.
MIT License
2.43k stars 480 forks source link

test(server_test.go) Fix a deadlock. #148

Closed xiang90 closed 10 years ago

xiang90 commented 10 years ago

We stop all the servers before finishing the MultiNode test. The mock transporter directly calls to the function of the target server. If the target is stopped, the transporter will just hang there waiting for a reply. So the sender server will also hang for a reply. We add a timeout for the reply to solve this problem.

benbjohnson commented 10 years ago

@xiangli-cmu lgtm.