Browse Source

integration: wait longer for member to be removed

Yicheng Qin 11 years ago
parent
commit
9132098960
2 changed files with 4 additions and 3 deletions
  1. 3 2
      integration/cluster_test.go
  2. 1 1
      test

+ 3 - 2
integration/cluster_test.go

@@ -308,8 +308,9 @@ func (c *cluster) RemoveMember(t *testing.T, id uint64) {
 			select {
 			case <-m.s.StopNotify():
 				m.Terminate(t)
-			case <-time.After(time.Second):
-				t.Fatalf("failed to remove member %s in one second", m.s.ID())
+			// stop delay / election timeout + 1s disk and network delay
+			case <-time.After(time.Duration(electionTicks)*tickDuration + time.Second):
+				t.Fatalf("failed to remove member %s in time", m.s.ID())
 			}
 		}
 	}

+ 1 - 1
test

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