Fix TestServiceAlloc flakes

This commit is contained in:
Wojciech Tyczynski 2016-11-25 14:50:40 +01:00
parent 545f749a0d
commit 17606603d2
3 changed files with 4 additions and 3 deletions

View File

@ -105,7 +105,7 @@ func (c *Repair) runOnce() error {
// the service collection. The caching layer keeps per-collection RVs,
// and this is proper, since in theory the collections could be hosted
// in separate etcd (or even non-etcd) instances.
list, err := c.registry.ListServices(ctx, nil)
list, err := c.registry.ListServices(ctx, &api.ListOptions{})
if err != nil {
return fmt.Errorf("unable to refresh the service IP block: %v", err)
}

View File

@ -94,7 +94,7 @@ func (c *Repair) runOnce() error {
// the service collection. The caching layer keeps per-collection RVs,
// and this is proper, since in theory the collections could be hosted
// in separate etcd (or even non-etcd) instances.
list, err := c.registry.ListServices(ctx, nil)
list, err := c.registry.ListServices(ctx, &api.ListOptions{})
if err != nil {
return fmt.Errorf("unable to refresh the port block: %v", err)
}

View File

@ -203,7 +203,8 @@ func (e *Store) List(ctx api.Context, options *api.ListOptions) (runtime.Object,
// ListPredicate returns a list of all the items matching m.
func (e *Store) ListPredicate(ctx api.Context, p storage.SelectionPredicate, options *api.ListOptions) (runtime.Object, error) {
if options == nil {
options = &api.ListOptions{ResourceVersion: "0"}
// By default we should serve the request from etcd.
options = &api.ListOptions{ResourceVersion: ""}
}
list := e.NewListFunc()
if name, ok := p.MatchesSingle(); ok {