Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow cluster DNS e2e test to be run in parallel #3744

Merged
merged 1 commit into from
Jan 23, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 9 additions & 8 deletions test/e2e/cluster_dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (

"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
"github.com/golang/glog"
)

Expand Down Expand Up @@ -66,7 +67,7 @@ func TestClusterDNS(c *client.Client) bool {
APIVersion: "v1beta1",
},
ObjectMeta: api.ObjectMeta{
Name: "dns-test",
Name: "dns-test-" + string(util.NewUUID()),
},
Spec: api.PodSpec{
Volumes: []api.Volume{
Expand Down Expand Up @@ -104,15 +105,15 @@ func TestClusterDNS(c *client.Client) bool {
}
_, err := podClient.Create(pod)
if err != nil {
glog.Errorf("Failed to create dns-test pod: %v", err)
glog.Errorf("Failed to create %s pod: %v", pod.Name, err)
return false
}
defer podClient.Delete(pod.Name)

waitForPodRunning(c, pod.Name)
pod, err = podClient.Get(pod.Name)
if err != nil {
glog.Errorf("Failed to get pod: %v", err)
glog.Errorf("Failed to get pod %s: %v", pod.Name, err)
return false
}

Expand All @@ -130,22 +131,22 @@ func TestClusterDNS(c *client.Client) bool {
Do().Raw()
if err != nil {
failed = append(failed, name)
glog.V(4).Infof("Lookup for %s failed: %v", name, err)
glog.V(4).Infof("Lookup using %s for %s failed: %v", pod.Name, name, err)
}
}
if len(failed) == 0 {
break
}
glog.Infof("lookups failed for: %v", failed)
time.Sleep(3 * time.Second)
glog.Infof("lookups using %s failed for: %v", pod.Name, failed)
time.Sleep(10 * time.Second)
}
if len(failed) != 0 {
glog.Errorf("DNS failed for: %v", failed)
glog.Errorf("DNS using %s failed for: %v", pod.Name, failed)
return false
}

// TODO: probe from the host, too.

glog.Info("DNS probes succeeded")
glog.Infof("DNS probes using %s succeeded", pod.Name)
return true
}
6 changes: 5 additions & 1 deletion test/e2e/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ func RunE2ETests(authConfig, certDir, host, repoRoot, provider string, orderseed
// TODO: Associate a timeout with each test individually.
go func() {
defer util.FlushLogs()
time.Sleep(10 * time.Minute)
// TODO: We should modify testSpec to include an estimated running time
// for each test and use that information to estimate a timeout
// value. Until then, as we add more tests (and before we move to
// parallel testing) we need to adjust this value as we add more tests.
time.Sleep(15 * time.Minute)
glog.Fatalf("This test has timed out. Cleanup not guaranteed.")
}()

Expand Down