Skip to content

Commit

Permalink
output/cloud: Polish check for concurrency option
Browse files Browse the repository at this point in the history
  • Loading branch information
codebien committed Jun 13, 2023
1 parent 8852cea commit 3eaee22
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions output/cloud/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,12 @@ func newOutput(params output.Params) (*Output, error) {
return nil, errors.New("tests with unspecified duration are not allowed when outputting data to k6 cloud")
}

if !(conf.MetricPushConcurrency.Int64 > 0) {
if conf.MetricPushConcurrency.Int64 < 1 {
return nil, fmt.Errorf("metrics push concurrency must be a positive number but is %d",
conf.MetricPushConcurrency.Int64)
}

if !(conf.MaxMetricSamplesPerPackage.Int64 > 0) {
if conf.MaxMetricSamplesPerPackage.Int64 < 1 {
return nil, fmt.Errorf("metric samples per package must be a positive number but is %d",
conf.MaxMetricSamplesPerPackage.Int64)
}
Expand Down

0 comments on commit 3eaee22

Please sign in to comment.