*: detect leaky goroutines, fix leaks

gexpect.Interact leaks. This adds ReadLine method to wait for the leaky
goroutine to accept an EOF.

Fixes https://github.com/coreos/etcd/issues/4258.

Reference: https://github.com/coreos/etcd/pull/4261#issuecomment-174198945.
This commit is contained in:
Gyu-Ho Lee
2016-01-22 16:00:53 -08:00
parent 5a9f81b198
commit 96d2ee20e3
8 changed files with 223 additions and 123 deletions

View File

@ -17,10 +17,12 @@ package integration
import (
"os/exec"
"testing"
"github.com/coreos/etcd/pkg/testutil"
)
func TestUpgradeMember(t *testing.T) {
defer afterTest(t)
defer testutil.AfterTest(t)
m := mustNewMember(t, "integration046", false)
cmd := exec.Command("cp", "-r", "testdata/integration046_data/conf", "testdata/integration046_data/log", "testdata/integration046_data/snapshot", m.DataDir)
err := cmd.Run()