Commit 6778902
authored
test(2275): add 401-not-retried regression test (#178)
Locks in that HTTP 401 responses on /api/v1/audit/tool-call are terminal
end-to-end through the WireMock HTTP path. Backstops
getaxonflow/axonflow-enterprise#2275 where a customer's misconfigured
deployment caused a tight 401 retry loop against community-saas (~30
401/hour from a single source IP).
Java SDK is already safe: AxonFlow.handleErrorResponse maps 401 to
AuthenticationException, and RetryExecutor.isRetryable returns false
for AuthenticationException
(src/main/java/com/getaxonflow/sdk/util/RetryExecutor.java:117-146).
The existing RetryExecutorTest.shouldNotRetryOnAuthenticationException
tests this at the exception-class level. This new test makes the
contract explicit at the HTTP-status-code level for the specific
endpoint named in #2275.
Mutation-tested: removing AuthenticationException from the
non-retryable list AND broadening the AxonFlowException retry check
from `>= 500` to `>= 400` makes the test fail with
`Expected exactly 1 requests matching the following pattern but
received 3`, confirming the assertion isn't tautological.
No code change; test-only.
Signed-off-by: Saurabh Jain <saurabh.jain@getaxonflow.com>1 parent 318b827 commit 6778902
1 file changed
Lines changed: 30 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
246 | 276 | | |
0 commit comments