Skip to content

Commit 8f6d24b

Browse files
authored
Fix SnippetsFilter Functional test (#3751)
Add a check to wait for the GRPCRoute to be ready and increase the request timeout to cover an issue regarding an nginx worker process taking an extended period of time to shut down.
1 parent fc6aa9a commit 8f6d24b

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

tests/framework/timeout.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func DefaultTimeoutConfig() TimeoutConfig {
4949
DeleteNamespaceTimeout: 150 * time.Second,
5050
GetTimeout: 10 * time.Second,
5151
ManifestFetchTimeout: 10 * time.Second,
52-
RequestTimeout: 10 * time.Second,
52+
RequestTimeout: 30 * time.Second,
5353
ContainerRestartTimeout: 10 * time.Second,
5454
GetLeaderLeaseTimeout: 60 * time.Second,
5555
GetStatusTimeout: 60 * time.Second,

tests/suite/manifests/snippets-filter/valid-sf.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ spec:
77
- context: main
88
value: worker_priority 0;
99
- context: http
10-
value: aio on;
10+
value: aio off;
1111
- context: http.server
12-
value: auth_delay 10s;
12+
value: auth_delay 0s;
1313
- context: http.server.location
14-
value: keepalive_time 10s;
14+
value: keepalive_time 1h;
1515
---
1616
apiVersion: gateway.nginx.org/v1alpha1
1717
kind: SnippetsFilter

tests/suite/snippets_filter_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ var _ = Describe("SnippetsFilter", Ordered, Label("functional", "snippets-filter
6464

6565
BeforeAll(func() {
6666
Expect(resourceManager.ApplyFromFiles(snippetsFilter, namespace)).To(Succeed())
67+
Expect(resourceManager.WaitForAppsToBeReady(namespace)).To(Succeed())
6768
})
6869

6970
AfterAll(func() {
@@ -143,7 +144,7 @@ var _ = Describe("SnippetsFilter", Ordered, Label("functional", "snippets-filter
143144
},
144145
{
145146
Directive: "aio",
146-
Value: "on",
147+
Value: "off",
147148
File: fmt.Sprintf("%s%s", httpContext, httpRouteSuffix),
148149
},
149150
{
@@ -153,7 +154,7 @@ var _ = Describe("SnippetsFilter", Ordered, Label("functional", "snippets-filter
153154
},
154155
{
155156
Directive: "auth_delay",
156-
Value: "10s",
157+
Value: "0s",
157158
File: fmt.Sprintf("%s%s", httpServerContext, httpRouteSuffix),
158159
},
159160
{
@@ -171,7 +172,7 @@ var _ = Describe("SnippetsFilter", Ordered, Label("functional", "snippets-filter
171172
},
172173
{
173174
Directive: "keepalive_time",
174-
Value: "10s",
175+
Value: "1h",
175176
File: fmt.Sprintf("%s%s", httpServerLocationContext, httpRouteSuffix),
176177
},
177178
}),

0 commit comments

Comments
 (0)