Skip to content

Commit

Permalink
test: Add a fixed delay after a settings update (aws#3308)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-innis authored Jan 27, 2023
1 parent 8e35aa5 commit 28b46f3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/pkg/environment/aws/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ func (env *Environment) Cleanup(opts ...common.Option) {
fmt.Println("------- START AWS CLEANUP -------")
defer fmt.Println("------- END AWS CLEANUP -------")
}
env.ExpectSettingsOverridden(persistedSettings.Data)
env.Environment.CleanupObjects(CleanableObjects)
env.Environment.Cleanup(opts...)
}
Expand All @@ -56,4 +55,6 @@ func (env *Environment) ForceCleanup(opts ...common.Option) {

func (env *Environment) AfterEach(opts ...common.Option) {
env.Environment.AfterEach(opts...)
// Ensure we reset settings after collecting the controller logs
env.ExpectSettingsOverridden(persistedSettings.Data)
}
4 changes: 4 additions & 0 deletions test/pkg/environment/common/expectations.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@ func (env *Environment) EventuallyExpectKarpenterPodsHealthyWithOffset(offset in
)))
}
}).Should(Succeed())

// We add this delay in here since we currently don't have the liveness/readiness probe working on the webhook
// which means there's a bit of time after the pods go ready that the webhook isn't actually ready to receive traffic yet
time.Sleep(time.Second * 5)
}

func (env *Environment) EventuallyExpectHealthyPodCount(selector labels.Selector, numPods int) {
Expand Down

0 comments on commit 28b46f3

Please sign in to comment.