Explorar o código

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 %!s(int64=11) %!d(string=hai) anos
pai
achega
30690d15d9
Modificáronse 4 ficheiros con 3 adicións e 4 borrados
  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)
 			st.Recovery(snapshot.Data)
 			index = snapshot.Metadata.Index
+		} else {
+			index = 1
 		}
 		cfg.Cluster = NewClusterFromStore(cfg.Cluster.token, st)
 		cfg.Print()

+ 0 - 1
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)

+ 0 - 2
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)

+ 1 - 1
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)