diff --git a/tests/functional/remove_node_test.go b/tests/functional/remove_node_test.go index 8199c9891..c80521165 100644 --- a/tests/functional/remove_node_test.go +++ b/tests/functional/remove_node_test.go @@ -31,7 +31,7 @@ func TestRemoveNode(t *testing.T) { c.SyncCluster() - resp, _ := tests.Put("http://localhost:7001/v2/admin/config", "application/json", bytes.NewBufferString(`{"activeSize":4, "syncInterval":1}`)) + resp, _ := tests.Put("http://localhost:7001/v2/admin/config", "application/json", bytes.NewBufferString(`{"activeSize":4, "syncInterval":5}`)) if !assert.Equal(t, resp.StatusCode, 200) { t.FailNow() } @@ -41,11 +41,6 @@ func TestRemoveNode(t *testing.T) { client := &http.Client{} for i := 0; i < 2; i++ { for i := 0; i < 2; i++ { - r, _ := tests.Put("http://localhost:7001/v2/admin/config", "application/json", bytes.NewBufferString(`{"activeSize":3}`)) - if !assert.Equal(t, r.StatusCode, 200) { - t.FailNow() - } - client.Do(rmReq) fmt.Println("send remove to node3 and wait for its exiting") @@ -76,12 +71,7 @@ func TestRemoveNode(t *testing.T) { panic(err) } - r, _ = tests.Put("http://localhost:7001/v2/admin/config", "application/json", bytes.NewBufferString(`{"activeSize":4}`)) - if !assert.Equal(t, r.StatusCode, 200) { - t.FailNow() - } - - time.Sleep(time.Second + time.Second) + time.Sleep(time.Second + 5*time.Second) resp, err = c.Get("_etcd/machines", false, false) @@ -96,11 +86,6 @@ func TestRemoveNode(t *testing.T) { // first kill the node, then remove it, then add it back for i := 0; i < 2; i++ { - r, _ := tests.Put("http://localhost:7001/v2/admin/config", "application/json", bytes.NewBufferString(`{"activeSize":3}`)) - if !assert.Equal(t, r.StatusCode, 200) { - t.FailNow() - } - etcds[2].Kill() fmt.Println("kill node3 and wait for its exiting") etcds[2].Wait() @@ -131,11 +116,6 @@ func TestRemoveNode(t *testing.T) { panic(err) } - r, _ = tests.Put("http://localhost:7001/v2/admin/config", "application/json", bytes.NewBufferString(`{"activeSize":4}`)) - if !assert.Equal(t, r.StatusCode, 200) { - t.FailNow() - } - time.Sleep(time.Second + time.Second) resp, err = c.Get("_etcd/machines", false, false)