Merge pull request #1345 from snyk/fix/acc_google_bigquery_table_test
Update retry policy for GCP acc testsmain
commit
d256d98a1c
|
@ -22,7 +22,7 @@ func TestAcc_Google_BigqueryTable(t *testing.T) {
|
|||
// Logic below retries driftctl scan using a back-off strategy of retrying 'n' times
|
||||
// and doubling the amount of time waited after each one.
|
||||
ShouldRetry: func(result *test.ScanResult, retryDuration time.Duration, retryCount uint8) bool {
|
||||
if result.IsSync() || retryDuration > 10*time.Minute {
|
||||
if result.IsSync() || retryDuration > 15*time.Minute {
|
||||
return false
|
||||
}
|
||||
time.Sleep((2 * time.Duration(retryCount)) * time.Minute)
|
||||
|
|
|
@ -22,7 +22,7 @@ func TestAcc_Google_ComputeGlobalAddress(t *testing.T) {
|
|||
// Logic below retries driftctl scan using a back-off strategy of retrying 'n' times
|
||||
// and doubling the amount of time waited after each one.
|
||||
ShouldRetry: func(result *test.ScanResult, retryDuration time.Duration, retryCount uint8) bool {
|
||||
if result.IsSync() || retryDuration > 10*time.Minute {
|
||||
if result.IsSync() || retryDuration > 15*time.Minute {
|
||||
return false
|
||||
}
|
||||
time.Sleep((2 * time.Duration(retryCount)) * time.Minute)
|
||||
|
|
|
@ -438,7 +438,10 @@ func Run(t *testing.T, c AccTestCase) {
|
|||
if check.ShouldRetry == nil || !check.ShouldRetry(result, time.Since(timeBeforeRetry), retryCount) {
|
||||
break
|
||||
}
|
||||
logrus.WithField("count", fmt.Sprintf("%d", retryCount)).Debug("Retrying scan ...")
|
||||
logrus.
|
||||
WithField("count", fmt.Sprintf("%d", retryCount)).
|
||||
WithField("retry_duration", time.Since(timeBeforeRetry).Round(time.Second)).
|
||||
Debug("Retrying scan ...")
|
||||
_, _, _ = runDriftCtlCmd(driftctlCmd)
|
||||
result = c.getResult(t)
|
||||
retryCount++
|
||||
|
|
Loading…
Reference in New Issue