diff --git a/goad/goad.go b/goad/goad.go index e5785bcc..e7a31493 100644 --- a/goad/goad.go +++ b/goad/goad.go @@ -36,7 +36,10 @@ type CustomTask struct { RunnerPath string } -const nano = 1000000000 +const ( + MAX_REQUEST_COUNT = math.MaxInt32 + nano = 1000000000 +) var supportedRegions = []string{ "us-east-1", // N. Virginia @@ -170,8 +173,8 @@ func (c TestConfig) check() error { if c.Concurrency < 1 || c.Concurrency > concurrencyLimit { return fmt.Errorf("Invalid concurrency (use 1 - %d)", concurrencyLimit) } - if (c.Requests < 1 && c.Timelimit <= 0) || c.Requests > 2000000 { - return errors.New("Invalid total requests (use 1 - 2000000)") + if (c.Requests < 1 && c.Timelimit <= 0) || c.Requests > MAX_REQUEST_COUNT { + return errors.New(fmt.Sprintf("Invalid total requests (use 1 - %d)", MAX_REQUEST_COUNT)) } if c.Timelimit > 3600 { return errors.New("Invalid maximum execution time in seconds (use 0 - 3600)")