Parallelization of namespace deletion

This commit is contained in:
Wojciech Tyczynski
2016-02-18 14:50:43 +01:00
parent a7f06905c3
commit 506899008f
59 changed files with 197 additions and 100 deletions

View File

@@ -79,8 +79,9 @@ func NewStorage(opts generic.RESTOptions, connection client.ConnectionInfoGetter
ObjectNameFunc: func(obj runtime.Object) (string, error) {
return obj.(*api.Node).Name, nil
},
PredicateFunc: node.MatchNode,
QualifiedResource: api.Resource("nodes"),
PredicateFunc: node.MatchNode,
QualifiedResource: api.Resource("nodes"),
DeleteCollectionWorkers: opts.DeleteCollectionWorkers,
CreateStrategy: node.Strategy,
UpdateStrategy: node.Strategy,

View File

@@ -39,7 +39,7 @@ func (fakeConnectionInfoGetter) GetConnectionInfo(ctx api.Context, nodeName stri
func newStorage(t *testing.T) (*REST, *etcdtesting.EtcdTestServer) {
etcdStorage, server := registrytest.NewEtcdStorage(t, "")
restOptions := generic.RESTOptions{etcdStorage, generic.UndecoratedStorage}
restOptions := generic.RESTOptions{etcdStorage, generic.UndecoratedStorage, 1}
storage := NewStorage(restOptions, fakeConnectionInfoGetter{}, nil)
return storage.Node, server
}