Sean-Walker0 opened a new pull request, #7788:
URL: https://github.com/apache/shenyu/pull/7788
Supersedes #7678 (and its ancestor #7321) with both merge prerequisites from
the review addressed.
## Modifications
`DiscoveryVO` declares two distinct fields — `discoveryName` and
`discoveryType` — but its accessors were wired to the wrong one:
```java
public String getDiscoveryName() { return discoveryType; } //
returned the type
public void setDiscoveryName(final String name) { this.discoveryType = name;
}
```
Every read of `discoveryName` returned the discovery **type**, and writing
it corrupted `discoveryType`. The accessors now map to the `discoveryName`
field; `discoveryType` accessors are unchanged.
## Review prerequisites addressed
1. **Add/add test conflict resolved**: rebased onto current master and
combined the test classes — `DiscoveryTransferTest` keeps master's two
`mapToDTO` namespace cases and adds
`testMapToVoKeepsDiscoveryNameAndTypeSeparate` alongside them (single file, no
conflict).
2. **CI evidence**: this fresh branch/head should trigger the workflow
matrix normally (the platform event restriction applied to the churn on the old
branches); will confirm `pr_build` + the shenyu-admin test group run green.
## Verifying this change
- [x] Combined `DiscoveryTransferTest`: 3/3 green (`./mvnw -pl shenyu-admin
-am test -Dtest=DiscoveryTransferTest`), including master's two pre-existing
cases unchanged.
- [x] Red check on this head: reverting only the accessor rewiring makes
`testMapToVoKeepsDiscoveryNameAndTypeSeparate` fail (`expected: <prod-registry>
but was: <zookeeper>`), and restoring it turns green again.
## Notes
- Same two-line production fix reviewed and approved three times (in #7321,
#7678, and by MapStruct-path analysis in the #7678 review); no main-code caller
depends on the old behavior.
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.
- [x] Your local test passed `./mvnw clean install
-Dmaven.javadoc.skip=true` (module-scoped: `shenyu-admin` targeted test class +
checkstyle green; full matrix on this fresh head).
--
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]