Skip to content

Commit 1d56f40

Browse files
authored
Merge pull request goadapp#164 from cwaltken-edrans/156-remove-2m-limit-on-requests
Increase request limit to MaxInt32
2 parents 14c7595 + e313185 commit 1d56f40

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

goad/goad.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ type CustomTask struct {
3636
RunnerPath string
3737
}
3838

39-
const nano = 1000000000
39+
const (
40+
MAX_REQUEST_COUNT = math.MaxInt32
41+
nano = 1000000000
42+
)
4043

4144
var supportedRegions = []string{
4245
"us-east-1", // N. Virginia
@@ -170,8 +173,8 @@ func (c TestConfig) check() error {
170173
if c.Concurrency < 1 || c.Concurrency > concurrencyLimit {
171174
return fmt.Errorf("Invalid concurrency (use 1 - %d)", concurrencyLimit)
172175
}
173-
if (c.Requests < 1 && c.Timelimit <= 0) || c.Requests > 2000000 {
174-
return errors.New("Invalid total requests (use 1 - 2000000)")
176+
if (c.Requests < 1 && c.Timelimit <= 0) || c.Requests > MAX_REQUEST_COUNT {
177+
return errors.New(fmt.Sprintf("Invalid total requests (use 1 - %d)", MAX_REQUEST_COUNT))
175178
}
176179
if c.Timelimit > 3600 {
177180
return errors.New("Invalid maximum execution time in seconds (use 0 - 3600)")

0 commit comments

Comments
 (0)