app/vmselect/promql: fix TestIncrementalAggr test on systems less than 3 CPU cores

This is a follow-up for 4856a4cf5a
This commit is contained in:
Aliaksandr Valialkin 2023-03-20 20:37:16 -07:00
parent 83a8f87131
commit 75791bcb77
No known key found for this signature in database
GPG key ID: A72BEC6CD3D0DED1

View file

@ -8,6 +8,7 @@ import (
"sync"
"testing"
"github.com/VictoriaMetrics/VictoriaMetrics/app/vmselect/netstorage"
"github.com/VictoriaMetrics/metricsql"
)
@ -99,7 +100,7 @@ func TestIncrementalAggr(t *testing.T) {
}
func testIncrementalParallelAggr(iafc *incrementalAggrFuncContext, tssSrc, tssExpected []*timeseries) error {
const workersCount = 3
workersCount := netstorage.MaxWorkers()
tsCh := make(chan *timeseries)
var wg sync.WaitGroup
wg.Add(workersCount)