Browse Source

Re-enable a few tests I had missed.

Fix integration test for the change to log entry zero.

Increase test timeouts since integration tests often take
longer than 10s for me.
Ben Darnell 11 years ago
parent
commit
30690d15d9
4 changed files with 3 additions and 4 deletions
  1. 2 0
      etcdserver/server.go
  2. 0 1
      integration/member_test.go
  3. 0 2
      integration/v2_http_kv_test.go
  4. 1 1
      test

+ 2 - 0
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)
 			log.Printf("etcdserver: recovering from snapshot at index %d", snapshot.Metadata.Index)
 			st.Recovery(snapshot.Data)
 			st.Recovery(snapshot.Data)
 			index = snapshot.Metadata.Index
 			index = snapshot.Metadata.Index
+		} else {
+			index = 1
 		}
 		}
 		cfg.Cluster = NewClusterFromStore(cfg.Cluster.token, st)
 		cfg.Cluster = NewClusterFromStore(cfg.Cluster.token, st)
 		cfg.Print()
 		cfg.Print()

+ 0 - 1
integration/member_test.go

@@ -7,7 +7,6 @@ import (
 )
 )
 
 
 func TestRestartMember(t *testing.T) {
 func TestRestartMember(t *testing.T) {
-	t.Skip("TODO(bdarnell): re-enable this test")
 	defer afterTest(t)
 	defer afterTest(t)
 	c := NewCluster(t, 3)
 	c := NewCluster(t, 3)
 	c.Launch(t)
 	c.Launch(t)

+ 0 - 2
integration/v2_http_kv_test.go

@@ -865,7 +865,6 @@ func TestV2WatchWithIndex(t *testing.T) {
 }
 }
 
 
 func TestV2WatchKeyInDir(t *testing.T) {
 func TestV2WatchKeyInDir(t *testing.T) {
-	t.Skip("TODO(bdarnell): re-enable this test")
 	cl := NewCluster(t, 1)
 	cl := NewCluster(t, 1)
 	cl.Launch(t)
 	cl.Launch(t)
 	defer cl.Terminate(t)
 	defer cl.Terminate(t)
@@ -914,7 +913,6 @@ func TestV2WatchKeyInDir(t *testing.T) {
 }
 }
 
 
 func TestV2Head(t *testing.T) {
 func TestV2Head(t *testing.T) {
-	t.Skip("TODO(bdarnell): re-enable this test")
 	cl := NewCluster(t, 1)
 	cl := NewCluster(t, 1)
 	cl.Launch(t)
 	cl.Launch(t)
 	defer cl.Terminate(t)
 	defer cl.Terminate(t)

+ 1 - 1
test

@@ -39,7 +39,7 @@ split=(${TEST// / })
 TEST=${split[@]/#/${REPO_PATH}/}
 TEST=${split[@]/#/${REPO_PATH}/}
 
 
 echo "Running tests..."
 echo "Running tests..."
-go test -timeout 10s ${COVER} $@ ${TEST} --race
+go test -timeout 20s ${COVER} $@ ${TEST} --race
 
 
 echo "Checking gofmt..."
 echo "Checking gofmt..."
 fmtRes=$(gofmt -l $FMT)
 fmtRes=$(gofmt -l $FMT)