Add a simple master benchmark and a wrapper to run it.

This commit is contained in:
Prashanth Balasubramanian
2015-04-09 14:50:27 -07:00
parent 822d4b0fcc
commit 4200033c0a
14 changed files with 714 additions and 64 deletions

View File

@@ -34,18 +34,15 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels"
"github.com/GoogleCloudPlatform/kubernetes/pkg/version"
"github.com/GoogleCloudPlatform/kubernetes/pkg/watch"
"github.com/GoogleCloudPlatform/kubernetes/test/integration/framework"
)
func init() {
requireEtcd()
}
func TestClient(t *testing.T) {
_, s := runAMaster(t)
_, s := framework.RunAMaster(t)
defer s.Close()
ns := api.NamespaceDefault
deleteAllEtcdKeys()
framework.DeleteAllEtcdKeys()
client := client.NewOrDie(&client.Config{Host: s.URL, Version: testapi.Version()})
info, err := client.ServerVersion()
@@ -194,9 +191,9 @@ func TestMultiWatch(t *testing.T) {
const watcherCount = 50
runtime.GOMAXPROCS(watcherCount)
deleteAllEtcdKeys()
defer deleteAllEtcdKeys()
_, s := runAMaster(t)
framework.DeleteAllEtcdKeys()
defer framework.DeleteAllEtcdKeys()
_, s := framework.RunAMaster(t)
defer s.Close()
ns := api.NamespaceDefault