yangjj-iso opened a new pull request, #7555:
URL: https://github.com/apache/shenyu/pull/7555
HTTP registration returned normally for non-success Admin responses, so the
failback repository never queued the rejected operation. Throw `IOException`
for response failures in both registration overloads, heartbeat and
unregistration, allowing the existing repository error handling to observe them.
Registration response failures follow the existing bounded failback policy
(18 attempts per pending task). The plain-text response contract does not
reliably distinguish transient errors from permanent validation errors, so both
consume that budget. Heartbeat failures propagate to their caller without
creating a registration retry. Offline requests retain the existing
any-Admin-success policy and report all-Admin failure without enqueueing
registration. Document this policy in Javadoc and the Unreleased notes.
Fixes #7440.
## Validation
- Against the original implementation, the targeted regression suite reports
17 assertion failures and zero errors.
- All HTTP registration and failback API tests pass: 70 tests, zero
failures/errors/skips (45 HTTP, 25 API).
- Regressions use the real registration helper, repository and failback task
with mocked HTTP responses and timer scheduling. They cover first/last Admin
rejection, failed retry preservation, successful retry removing only its
pending registration, and an unrelated metadata failure remaining queued.
- Helper tests cover null, empty, text-error, validation-error and
successful responses; heartbeat/offline tests verify their existing lifecycle
policies.
- Checkstyle reports zero violations. RAT and `git diff --check` pass.
```bash
./mvnw -B -ntp -pl :shenyu-register-client-http -am \
-Dtest=RegisterUtilsTest,HttpClientRegisterRepositoryTest,FailbackRegistryRepositoryTest,FailureRegistryTaskTest,OkHttpToolsTest,RuntimeUtilsTest,SystemUtilsTest
\
-Dsurefire.failIfNoSpecifiedTests=false -DfailIfNoTests=false \
-Djacoco.skip=true -Dmaven.javadoc.skip=true test apache-rat:check
```
No deployed Admin/gateway integration test was run.
Make sure that:
- [x] You have read the [contribution
guidelines](https://shenyu.apache.org/community/contributor-guide).
- [x] You submit test cases (unit or integration tests) that back your
changes.
- [ ] Your local test passed `./mvnw clean install
-Dmaven.javadoc.skip=true`. The affected-module validation is recorded above;
the full repository build was not run.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]