diff --git a/pkg/backends/jmeter/resources.go b/pkg/backends/jmeter/resources.go index 93965ffd..e679e85e 100644 --- a/pkg/backends/jmeter/resources.go +++ b/pkg/backends/jmeter/resources.go @@ -9,6 +9,7 @@ import ( "fmt" "io" "os" + "strconv" "strings" "go.uber.org/zap" @@ -375,6 +376,10 @@ func (b *Backend) NewJMeterMasterJob(loadTest loadTestV1.LoadTest, reportURL str Name: "WORKER_SVC_NAME", Value: loadTestWorkerServiceName, }, + { + Name: "WORKER_TOTAL", + Value: strconv.Itoa(int(*loadTest.Spec.DistributedPods)), + }, { Name: "USE_WORKERS", Value: "true", diff --git a/pkg/backends/jmeter/resources_test.go b/pkg/backends/jmeter/resources_test.go index 75ac5543..ed097965 100644 --- a/pkg/backends/jmeter/resources_test.go +++ b/pkg/backends/jmeter/resources_test.go @@ -106,6 +106,7 @@ func TestGetNamespaceFromInvalidName(t *testing.T) { } func TestPodResourceConfiguration(t *testing.T) { + var two int32 = 2 lt := loadTestV1.LoadTest{ Spec: loadTestV1.LoadTestSpec{ MasterConfig: loadTestV1.ImageDetails{ @@ -116,6 +117,7 @@ func TestPodResourceConfiguration(t *testing.T) { Image: defaultWorkerImageName, Tag: defaultWorkerImageTag, }, + DistributedPods: &two, }, }