Use backoff from util/flowcontroll in federated namespace controller and other minor fixes

This commit is contained in:
Marcin Wielgus
2016-08-16 16:30:19 +02:00
parent 378a49613f
commit c1cbe4771b
3 changed files with 50 additions and 47 deletions

View File

@@ -66,11 +66,13 @@ func TestNamespaceController(t *testing.T) {
return nil, fmt.Errorf("Unknown cluster")
}
})
namespaceController.clusterAvailableDelay = 1000 * time.Millisecond
namespaceController.clusterAvailableDelay = time.Second
namespaceController.namespaceReviewDelay = 50 * time.Millisecond
namespaceController.smallDelay = 20 * time.Millisecond
namespaceController.updateTimeout = 5 * time.Second
namespaceController.Start()
stop := make(chan struct{})
namespaceController.Run(stop)
ns1 := api_v1.Namespace{
ObjectMeta: api_v1.ObjectMeta{
@@ -101,7 +103,7 @@ func TestNamespaceController(t *testing.T) {
assert.Equal(t, ns1.Name, createdNamespace2.Name)
// assert.Contains(t, createdNamespace2.Annotations, "A")
namespaceController.Stop()
close(stop)
}
func toFederatedInformerForTestOnly(informer util.FederatedInformer) util.FederatedInformerForTestOnly {