Commit 8b17f02
test(appprotect): tolerate connection drops during reload in watch-namespace-label test
The watch-namespace-label AppProtect e2e test toggles namespace labels, each
of which triggers an NGINX reload plus an App Protect WAF soft reset. Requests
that land during the reload window hit recycled workers and get a closed
connection (access log status 000), surfacing as an uncaught
requests.exceptions.ConnectionError (RemoteDisconnected) that fails the test.
Add a retry_get_until_body_contains helper that retries the request and
tolerates ConnectionError during reloads, mirroring the transient-handling
already done by ensure_response_from_backend and wait_for_reload. Use it at the
three request sites in test_app_protect_watch_namespace_label.py and drop the
now-unused requests import.
Also add FLAKY_RELOAD_REQUESTS.md documenting the pattern so the same fix can be
applied to other reload-sensitive e2e tests.
Test-only change: no product code, codegen, or snapshot updates.1 parent e0c662a commit 8b17f02
2 files changed
Lines changed: 33 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
| |||
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | | - | |
160 | | - | |
| 159 | + | |
| 160 | + | |
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
180 | | - | |
| 179 | + | |
| 180 | + | |
181 | 181 | | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | 182 | | |
191 | 183 | | |
192 | 184 | | |
| |||
202 | 194 | | |
203 | 195 | | |
204 | 196 | | |
205 | | - | |
206 | | - | |
| 197 | + | |
| 198 | + | |
207 | 199 | | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | 200 | | |
217 | 201 | | |
218 | 202 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1948 | 1948 | | |
1949 | 1949 | | |
1950 | 1950 | | |
| 1951 | + | |
| 1952 | + | |
| 1953 | + | |
| 1954 | + | |
| 1955 | + | |
| 1956 | + | |
| 1957 | + | |
| 1958 | + | |
| 1959 | + | |
| 1960 | + | |
| 1961 | + | |
| 1962 | + | |
| 1963 | + | |
| 1964 | + | |
| 1965 | + | |
| 1966 | + | |
| 1967 | + | |
| 1968 | + | |
| 1969 | + | |
| 1970 | + | |
| 1971 | + | |
| 1972 | + | |
| 1973 | + | |
| 1974 | + | |
| 1975 | + | |
| 1976 | + | |
1951 | 1977 | | |
1952 | 1978 | | |
1953 | 1979 | | |
| |||
0 commit comments