Skip to content

Commit

Permalink
remove max duration
Browse files Browse the repository at this point in the history
  • Loading branch information
Philippe Lafoucrière committed Feb 4, 2016
1 parent e18a95e commit 4f01a1d
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions autoupdate/auto_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ import (
)

const (
AUTOUPDATE_MAX_DURATION = 3600
UPDATE_SET_INVALID = "invalid"
UPDATE_SET_SUCCESS = "test_passed"
UPDATE_SET_FAIL = "test_failed"
UPDATE_SET_INVALID = "invalid"
UPDATE_SET_SUCCESS = "test_passed"
UPDATE_SET_FAIL = "test_failed"
)

type RequirementUpdate struct {
Expand Down Expand Up @@ -128,14 +127,8 @@ func Run(projectSlug string, testSuite []string) error {
return err
}

// We'll be checking loop duration on each iteration
startTime := time.Now()
// Loop until tests are green
for {
if time.Since(startTime).Seconds() > AUTOUPDATE_MAX_DURATION {
fmt.Println("Max loop duration reached, aborting.")
break
}
updateSet, err := fetchUpdateSet(projectSlug)
if err != nil {
return err
Expand Down

0 comments on commit 4f01a1d

Please sign in to comment.