Skip to content

Commit 6136715

Browse files
authored
Fix scale test errors caused by upstream server count (#2439)
Problem: When the scale test runs with NGINX Plus with 648 upstream servers, it reports both NGF and NGINX Plus errors, because at some point the upstream zone size is no longer enough to hold all upstream servers. As a result, NGF fails to update NGINX Plus. Solution: Adjust the upstream server count on the scale test when it runs with NGINX Plus from 648 to 556. Testing: Scale test passed 5 consecutive times.
1 parent 1a9cea0 commit 6136715

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

tests/suite/scale_test.go

+17-5
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,16 @@ var _ = Describe("Scale test", Ordered, Label("nfr", "scale"), func() {
5050
ngfPodName string
5151
promInstance framework.PrometheusInstance
5252
promPortForwardStopCh = make(chan struct{})
53+
54+
upstreamServerCount int32
5355
)
5456

5557
const (
56-
httpListenerCount = 64
57-
httpsListenerCount = 64
58-
httpRouteCount = 1000
59-
upstreamServerCount = 648
58+
httpListenerCount = 64
59+
httpsListenerCount = 64
60+
httpRouteCount = 1000
61+
ossUpstreamServerCount = 648
62+
plusUpstreamServerCount = 556
6063
)
6164

6265
BeforeAll(func() {
@@ -85,6 +88,12 @@ var _ = Describe("Scale test", Ordered, Label("nfr", "scale"), func() {
8588
if !clusterInfo.IsGKE {
8689
Expect(promInstance.PortForward(k8sConfig, promPortForwardStopCh)).To(Succeed())
8790
}
91+
92+
if *plusEnabled {
93+
upstreamServerCount = plusUpstreamServerCount
94+
} else {
95+
upstreamServerCount = ossUpstreamServerCount
96+
}
8897
})
8998

9099
BeforeEach(func() {
@@ -563,7 +572,10 @@ The logs are attached only if there are errors.
563572
)
564573
})
565574

566-
It(fmt.Sprintf("scales upstream servers to %d", upstreamServerCount), func() {
575+
It(fmt.Sprintf("scales upstream servers to %d for OSS and %d for Plus",
576+
ossUpstreamServerCount,
577+
plusUpstreamServerCount,
578+
), func() {
567579
const testName = "TestScale_UpstreamServers"
568580

569581
testResultsDir := filepath.Join(resultsDir, testName)

0 commit comments

Comments
 (0)