Skip to content

Commit

Permalink
make retry loops consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
paulnpdev committed Nov 30, 2021
1 parent 459f731 commit 71528a1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions common/persistence/persistence-tests/executionManagerTest.go
Expand Up @@ -1864,7 +1864,7 @@ func (s *ExecutionManagerSuite) TestCancelTransferTaskTasks() {

// Lookup is time-sensitive, hence retry
var deleteCheck []tasks.Task
for i := 1; i < 4; i++ {
for i := 0; i < 3; i++ {
deleteCheck, err = s.GetTransferTasks(1, false)
if len(deleteCheck) == 0 {
break
Expand Down Expand Up @@ -2466,7 +2466,7 @@ func (s *ExecutionManagerSuite) TestTimerTasksRangeComplete() {

var timerTasks []tasks.Task
// Try a couple of times to avoid flakiness
for i := 1; i < 4; i++ {
for i := 0; i < 3; i++ {
timerTasks, err1 = s.GetTimerTasks(1, true) // use page size one to force pagination
if len(taskSlice) == len(timerTasks) {
break
Expand Down
Expand Up @@ -835,7 +835,7 @@ func (m *MetadataPersistenceSuiteV2) TestDeleteNamespace() {
// May need to loop here to avoid potential inconsistent read-after-write in cassandra
var err4 error
var resp4 *p.GetNamespaceResponse
for i := 1; i < 4; i++ {
for i := 0; i < 3; i++ {
resp4, err4 = m.GetNamespace("", name)
if err4 != nil {
break
Expand Down

0 comments on commit 71528a1

Please sign in to comment.