Skip to content

Commit

Permalink
set timeout on deployment rollout (#2007)
Browse files Browse the repository at this point in the history
Signed-off-by: Ahmed ElSayed <[email protected]>
  • Loading branch information
ahmelsayed authored Aug 4, 2021
1 parent 08cdde0 commit cd047b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/scalers/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as sh from "shelljs";

export function waitForRollout(type: 'deployment' | 'statefulset', name: string, namespace: string): number {
return sh.exec(`kubectl rollout status ${type}/${name} -n ${namespace}`).code
export function waitForRollout(type: 'deployment' | 'statefulset', name: string, namespace: string, timeoutSeconds = 180): number {
return sh.exec(`kubectl rollout status ${type}/${name} -n ${namespace} --timeout ${timeoutSeconds}s`).code
}

export function sleep(duration: number) {
Expand Down

0 comments on commit cd047b0

Please sign in to comment.