Skip to content

Commit 228841d

Browse files
committed
upgrade adc
1 parent 1ab93fc commit 228841d

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ IMG ?= apache/apisix-ingress-controller:$(IMAGE_TAG)
2727
ENVTEST_K8S_VERSION = 1.30.0
2828
KIND_NAME ?= apisix-ingress-cluster
2929

30-
ADC_VERSION ?= 0.22.1
30+
ADC_VERSION ?= 0.23.1
3131

3232
DIR := $(shell pwd)
3333

test/benchmark/benchmark_test.go

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ package benchmark
1919

2020
import (
2121
"bytes"
22+
"context"
2223
"fmt"
2324
"net/http"
2425
"os"
@@ -293,19 +294,16 @@ spec:
293294
s.Deployer.ScaleIngress(1)
294295

295296
now := time.Now()
296-
Eventually(func() int {
297-
success := 0
298-
for i := 0; i < totalConsumers; i++ {
299-
consumerName := getConsumerName(i)
300-
if s.NewAPISIXClient().GET("/get").
301-
WithHeader("apikey", consumerName).
302-
Expect().Raw().StatusCode != http.StatusOK {
303-
return success
304-
}
305-
success++
297+
Eventually(func() error {
298+
consumer, err := s.DefaultDataplaneResource().Consumer().List(context.Background())
299+
if err != nil {
300+
return err
301+
}
302+
if len(consumer) != totalConsumers {
303+
return fmt.Errorf("expect %d consumers, but got %d", totalConsumers, len(consumer))
306304
}
307-
return success
308-
}).WithTimeout(15 * time.Minute).ProbeEvery(1 * time.Second).Should(Equal(totalConsumers))
305+
return nil
306+
}).WithTimeout(15*time.Minute).ProbeEvery(1*time.Second).ShouldNot(HaveOccurred(), "waiting for all consumers to be synced to APISIX")
309307
costTime := time.Since(now)
310308
report.AddResult(TestResult{
311309
Scenario: "ApisixRoute With Consumers Benchmark",

0 commit comments

Comments
 (0)