Retry resizing replication controllers in kubectl

This commit is contained in:
Prashanth Balasubramanian
2015-02-28 18:40:57 -08:00
parent 71e545bf81
commit 1970c2d201
7 changed files with 113 additions and 12 deletions

View File

@@ -68,6 +68,13 @@ func TestPoll(t *testing.T) {
if invocations == 0 {
t.Errorf("Expected at least one invocation, got zero")
}
expectedError := errors.New("Expected error")
f = ConditionFunc(func() (bool, error) {
return false, expectedError
})
if err := Poll(time.Microsecond, time.Microsecond, f); err == nil || err != expectedError {
t.Fatalf("Expected error %v, got none %v", expectedError, err)
}
}
func TestPollForever(t *testing.T) {