|
|
@@ -517,6 +517,7 @@ func TestDoProposal(t *testing.T) {
|
|
|
for i, tt := range tests {
|
|
|
st := &storeRecorder{}
|
|
|
srv := &EtcdServer{
|
|
|
+ cfg: &ServerConfig{TickMs: 1},
|
|
|
r: raftNode{
|
|
|
Node: newNodeCommitter(),
|
|
|
storage: &storageRecorder{},
|
|
|
@@ -547,6 +548,7 @@ func TestDoProposal(t *testing.T) {
|
|
|
func TestDoProposalCancelled(t *testing.T) {
|
|
|
wait := &waitRecorder{}
|
|
|
srv := &EtcdServer{
|
|
|
+ cfg: &ServerConfig{TickMs: 1},
|
|
|
r: raftNode{Node: &nodeRecorder{}},
|
|
|
w: wait,
|
|
|
reqIDGen: idutil.NewGenerator(0, time.Time{}),
|
|
|
@@ -566,6 +568,7 @@ func TestDoProposalCancelled(t *testing.T) {
|
|
|
|
|
|
func TestDoProposalTimeout(t *testing.T) {
|
|
|
srv := &EtcdServer{
|
|
|
+ cfg: &ServerConfig{TickMs: 1},
|
|
|
r: raftNode{Node: &nodeRecorder{}},
|
|
|
w: &waitRecorder{},
|
|
|
reqIDGen: idutil.NewGenerator(0, time.Time{}),
|
|
|
@@ -579,6 +582,7 @@ func TestDoProposalTimeout(t *testing.T) {
|
|
|
|
|
|
func TestDoProposalStopped(t *testing.T) {
|
|
|
srv := &EtcdServer{
|
|
|
+ cfg: &ServerConfig{TickMs: 1},
|
|
|
r: raftNode{Node: &nodeRecorder{}},
|
|
|
w: &waitRecorder{},
|
|
|
reqIDGen: idutil.NewGenerator(0, time.Time{}),
|
|
|
@@ -653,6 +657,7 @@ func TestSyncTrigger(t *testing.T) {
|
|
|
n := newReadyNode()
|
|
|
st := make(chan time.Time, 1)
|
|
|
srv := &EtcdServer{
|
|
|
+ cfg: &ServerConfig{TickMs: 1},
|
|
|
r: raftNode{
|
|
|
Node: n,
|
|
|
raftStorage: raft.NewMemoryStorage(),
|
|
|
@@ -733,6 +738,7 @@ func TestTriggerSnap(t *testing.T) {
|
|
|
st := &storeRecorder{}
|
|
|
p := &storageRecorder{}
|
|
|
srv := &EtcdServer{
|
|
|
+ cfg: &ServerConfig{TickMs: 1},
|
|
|
snapCount: uint64(snapc),
|
|
|
r: raftNode{
|
|
|
Node: newNodeCommitter(),
|
|
|
@@ -965,6 +971,7 @@ func TestPublish(t *testing.T) {
|
|
|
ch <- Response{}
|
|
|
w := &waitWithResponse{ch: ch}
|
|
|
srv := &EtcdServer{
|
|
|
+ cfg: &ServerConfig{TickMs: 1},
|
|
|
id: 1,
|
|
|
r: raftNode{Node: n},
|
|
|
attributes: Attributes{Name: "node1", ClientURLs: []string{"http://a", "http://b"}},
|
|
|
@@ -1006,6 +1013,7 @@ func TestPublish(t *testing.T) {
|
|
|
// TestPublishStopped tests that publish will be stopped if server is stopped.
|
|
|
func TestPublishStopped(t *testing.T) {
|
|
|
srv := &EtcdServer{
|
|
|
+ cfg: &ServerConfig{TickMs: 1},
|
|
|
r: raftNode{
|
|
|
Node: &nodeRecorder{},
|
|
|
transport: &nopTransporter{},
|
|
|
@@ -1024,6 +1032,7 @@ func TestPublishStopped(t *testing.T) {
|
|
|
func TestPublishRetry(t *testing.T) {
|
|
|
n := &nodeRecorder{}
|
|
|
srv := &EtcdServer{
|
|
|
+ cfg: &ServerConfig{TickMs: 1},
|
|
|
r: raftNode{Node: n},
|
|
|
w: &waitRecorder{},
|
|
|
done: make(chan struct{}),
|
|
|
@@ -1047,6 +1056,7 @@ func TestUpdateVersion(t *testing.T) {
|
|
|
w := &waitWithResponse{ch: ch}
|
|
|
srv := &EtcdServer{
|
|
|
id: 1,
|
|
|
+ cfg: &ServerConfig{TickMs: 1},
|
|
|
r: raftNode{Node: n},
|
|
|
attributes: Attributes{Name: "node1", ClientURLs: []string{"http://node1.com"}},
|
|
|
cluster: &cluster{},
|