Skip to content

Commit

Permalink
Fix TestProbeRuntimeAfterStartup/periodSeconds=0 flake (knative#12643) (
Browse files Browse the repository at this point in the history
#1102)

We weren't waiting long enough to for the pod to become unready

Fixes knative#12586

Co-authored-by: Dave Protasowski <dprotaso@gmail.com>
  • Loading branch information
nak3 and dprotaso authored Apr 21, 2022
1 parent cc8e56c commit cbcc812
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions test/conformance/runtime/readiness_probe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,15 @@ import (

// readinessPropagationTime is how long to poll to allow for readiness probe
// changes to propagate to ingresses/activator.
// This is based on the default scaleToZeroGracePeriod.
const readinessPropagationTime = 30 * time.Second
//
// When Readiness.PeriodSeconds=0 the underlying Pods use the K8s
// defaults for readiness. Those are:
// - Readiness.PeriodSeconds=10
// - Readiness.FailureThreshold=3
//
// Thus it takes at a mininum 30 seconds for the Pod to become
// unready. To account for this we bump max propagation time
const readinessPropagationTime = time.Minute

func TestProbeRuntime(t *testing.T) {
t.Parallel()
Expand Down

0 comments on commit cbcc812

Please sign in to comment.