Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion test/benchmark/config/nighthawk-client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ spec:
- name: nighthawk-client
image: envoyproxy/nighthawk-dev:latest
imagePullPolicy: IfNotPresent
args: ["nighthawk_client"] # Fill-up args at runtime
command:
- /usr/local/bin/nighthawk_client
restartPolicy: Never
backoffLimit: 3
2 changes: 1 addition & 1 deletion test/benchmark/config/nighthawk-test-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
- name: nighthawk-server
image: envoyproxy/nighthawk-dev:latest
imagePullPolicy: IfNotPresent
args: ["nighthawk_test_server", "-c", "/etc/test-server-config/nighthawk-test-server-config.yaml"]
args: ["-c", "/etc/test-server-config/nighthawk-test-server-config.yaml"]
ports:
- containerPort: 8080
volumeMounts:
Expand Down
7 changes: 4 additions & 3 deletions test/benchmark/suite/suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ func (b *BenchmarkTestSuite) Benchmark(t *testing.T, ctx context.Context, jobNam
for i := 1; i <= host; i++ {
requestHeaders = append(requestHeaders, "Host: "+fmt.Sprintf(hostnamePattern, i))
}
jobNN, err := b.createBenchmarkClientJob(ctx, jobName, gatewayHostPort, requestHeaders)
jobNN, err := b.createBenchmarkClientJob(t, jobName, gatewayHostPort, requestHeaders)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -251,7 +251,7 @@ func (b *BenchmarkTestSuite) Benchmark(t *testing.T, ctx context.Context, jobNam
return report, nil
}

func (b *BenchmarkTestSuite) createBenchmarkClientJob(ctx context.Context, name, gatewayHostPort string, requestHeaders []string) (*types.NamespacedName, error) {
func (b *BenchmarkTestSuite) createBenchmarkClientJob(t *testing.T, name, gatewayHostPort string, requestHeaders []string) (*types.NamespacedName, error) {
job := b.BenchmarkClientJob.DeepCopy()
job.SetName(name)
job.SetLabels(map[string]string{
Expand All @@ -262,7 +262,8 @@ func (b *BenchmarkTestSuite) createBenchmarkClientJob(ctx context.Context, name,
container := &job.Spec.Template.Spec.Containers[0]
container.Args = append(container.Args, runtimeArgs...)

if err := b.CreateResource(ctx, job); err != nil {
t.Logf("Creating benchmark client job: %s with args: %v", name, job)
if err := b.CreateResource(t.Context(), job); err != nil {
return nil, err
}

Expand Down