Fix small race in e2e

Occasionally we get spurious errors about "no route to host" when we
race with kube-proxy.  This should reduce that.  It's mostly just log
noise.
pull/564/head
Tim Hockin 2019-03-07 17:14:18 -08:00
parent 50bf223a05
commit 19e333b5cc
1 changed files with 2 additions and 1 deletions

View File

@ -623,6 +623,7 @@ func (j *ServiceTestJig) waitForConditionOrFail(namespace, name string, timeout
// name as the jig and runs the "netexec" container.
func (j *ServiceTestJig) newRCTemplate(namespace string) *v1.ReplicationController {
var replicas int32 = 1
var grace int64 = 3 // so we don't race with kube-proxy when scaling up/down
rc := &v1.ReplicationController{
ObjectMeta: metav1.ObjectMeta{
@ -654,7 +655,7 @@ func (j *ServiceTestJig) newRCTemplate(namespace string) *v1.ReplicationControll
},
},
},
TerminationGracePeriodSeconds: new(int64),
TerminationGracePeriodSeconds: &grace,
},
},
},