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

raft: add raft test suite #2203

Merged
merged 1 commit into from
Feb 1, 2015
Merged

raft: add raft test suite #2203

merged 1 commit into from
Feb 1, 2015

Conversation

xiang90
Copy link
Contributor

@xiang90 xiang90 commented Feb 1, 2015

start a basic raft test suite.

the goal of this pr is to set up the desired network interface and the functionality of node.

a node should be able to restart, pause.
a network should be able to delay, drop message.

@xiang90
Copy link
Contributor Author

xiang90 commented Feb 1, 2015

/cc @bdarnell @yichengq

drop(from, to uint64, rate float64)
// delay message for (0, d] randomly at given rate (1.0 delay all messages)
// do we need rate here?
delay(from, to uint64, d time.Duration, rate float64)
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe a duplicate(from, to uint64, d time.Duration, rate float64) option as well? (messages are sent a second time after (0, d] seconds)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure, we could. but actually i think it is the not the network, but the raft node that generates the duplicate messages. When do you think a network layer would duplicate a message in reality?

Copy link
Contributor

Choose a reason for hiding this comment

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

That's true, I guess all the duplicate-message scenarios I can come up with are actually the application retrying.

@bdarnell
Copy link
Contributor

bdarnell commented Feb 1, 2015

LGTM

xiang90 added a commit that referenced this pull request Feb 1, 2015
@xiang90 xiang90 merged commit d16c5e1 into etcd-io:master Feb 1, 2015
@xiang90 xiang90 deleted the raft_test branch February 1, 2015 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

2 participants