add 'thrash' test that starts and stops a bunch of rc's in parallel

This commit is contained in:
Daniel Smith 2015-03-10 16:59:26 -07:00
parent aa4dbc0df8
commit a5396a808e

View File

@ -18,6 +18,7 @@ package e2e
import ( import (
"fmt" "fmt"
"sync"
"time" "time"
"github.com/GoogleCloudPlatform/kubernetes/pkg/api" "github.com/GoogleCloudPlatform/kubernetes/pkg/api"
@ -195,4 +196,20 @@ var _ = PDescribe("Density", func() {
RCName = "my-hostname-density100-" + string(util.NewUUID()) RCName = "my-hostname-density100-" + string(util.NewUUID())
RunRC(c, RCName, ns, "dockerfile/nginx", 100*minionCount) RunRC(c, RCName, ns, "dockerfile/nginx", 100*minionCount)
}) })
It("should have master components that can handle many short-lived pods", func() {
threads := 5
var wg sync.WaitGroup
wg.Add(threads)
for i := 0; i < threads; i++ {
go func() {
defer wg.Done()
for i := 0; i < 10; i++ {
name := "my-hostname-thrash-" + string(util.NewUUID())
RunRC(c, name, ns, "kubernetes/pause", 10*minionCount)
}
}()
}
wg.Wait()
})
}) })