diff --git a/etcdserver/server.go b/etcdserver/server.go index c86970c3f..52d816a01 100644 --- a/etcdserver/server.go +++ b/etcdserver/server.go @@ -249,6 +249,8 @@ func NewServer(cfg *ServerConfig) (*EtcdServer, error) { log.Printf("etcdserver: recovering from snapshot at index %d", snapshot.Metadata.Index) st.Recovery(snapshot.Data) index = snapshot.Metadata.Index + } else { + index = 1 } cfg.Cluster = NewClusterFromStore(cfg.Cluster.token, st) cfg.Print() diff --git a/integration/member_test.go b/integration/member_test.go index dcd71ebdc..7a8457fe7 100644 --- a/integration/member_test.go +++ b/integration/member_test.go @@ -7,7 +7,6 @@ import ( ) func TestRestartMember(t *testing.T) { - t.Skip("TODO(bdarnell): re-enable this test") defer afterTest(t) c := NewCluster(t, 3) c.Launch(t) diff --git a/integration/v2_http_kv_test.go b/integration/v2_http_kv_test.go index 140894bf3..55addb7cf 100644 --- a/integration/v2_http_kv_test.go +++ b/integration/v2_http_kv_test.go @@ -865,7 +865,6 @@ func TestV2WatchWithIndex(t *testing.T) { } func TestV2WatchKeyInDir(t *testing.T) { - t.Skip("TODO(bdarnell): re-enable this test") cl := NewCluster(t, 1) cl.Launch(t) defer cl.Terminate(t) @@ -914,7 +913,6 @@ func TestV2WatchKeyInDir(t *testing.T) { } func TestV2Head(t *testing.T) { - t.Skip("TODO(bdarnell): re-enable this test") cl := NewCluster(t, 1) cl.Launch(t) defer cl.Terminate(t) diff --git a/test b/test index 41a366388..aa8a12076 100755 --- a/test +++ b/test @@ -39,7 +39,7 @@ split=(${TEST// / }) TEST=${split[@]/#/${REPO_PATH}/} echo "Running tests..." -go test -timeout 10s ${COVER} $@ ${TEST} --race +go test -timeout 20s ${COVER} $@ ${TEST} --race echo "Checking gofmt..." fmtRes=$(gofmt -l $FMT)