konlue opened a new pull request, #7846:
URL: https://github.com/apache/shenyu/pull/7846
## Summary
Follow-up to #7721 (merged): the two new heartbeat-metadata tests fail on
master since #7785 introduced `InstanceInfoUtils.normalize` — the non-JSON
payloads (`version=1.0`) normalize to `"{}"`, breaking the refresh assertions
(as reported in the #7721 comments).
## Modifications
- Switch both payloads to JSON objects (`{"version":"1.0"}` /
`{"version":"2.0"}`), which `normalize` passes through compacted, keeping the
assertions' intent (refresh on repeated heartbeats, keep-last-known on a blank
payload) intact.
## Verifying this change
- [x] On current master with the old payloads: exactly the two tests fail
with `expected: <version=1.0> but was: <{}>`.
- [x] Targeted tests pass with JSON payloads:
```bash
./mvnw -B -ntp -pl shenyu-admin test -Dtest=InstanceCheckServiceTest
```
22/22 green.
- [x] Checkstyle passes:
```bash
./mvnw -B -ntp -pl shenyu-admin checkstyle:check
```
clean.
## Checklist
- [x] I have read the [Contributing
Guide](https://github.com/apache/shenyu/blob/master/CONTRIBUTING.md).
- [x] Unit test is updated.
--
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]