NeverENG opened a new pull request, #27:
URL: https://github.com/apache/dubbo-net/pull/27

   ## Summary
   
   Fixes #26. This is a **test/example address helper** change, not a DubboNet 
library or protocol change.
   
   - `TestEndpointOptions.ResolveProviderAddressesAsync()` now handles 
`localhost` (case-insensitively) with IPv4/IPv6 loopback addresses, keeping 
IPv4 first. Literal IPs are unchanged; other hostnames still use DNS.
   - Keep the existing assertion that a localhost provider address must be 
loopback. Cover the default no-argument path as well as explicit `localhost` 
and `LOCALHOST`. `QueryDemo` and `DubboClientIntegrationTests` both consume 
this helper; README documents local examples using `--host localhost`.
   
   ## Why
   
   On one macOS / .NET 10 host, `.NET` DNS resolution of `localhost` yielded 
non-loopback interface addresses along with `127.0.0.1` and `::1`. The original 
unit test failed, and a local example could select a non-loopback Provider 
address. The `/etc/hosts` entries were normal. This change makes the intended 
*local* endpoint contract explicit rather than weakening the test or changing 
the machine's DNS configuration. It does not claim that all macOS hosts behave 
the same way.
   
   ## Test-first evidence
   
   - The old `main` test fails on the affected host because several resolved 
addresses are not loopback.
   - The expanded test for explicit lower/upper-case `localhost` failed **2/2** 
before the helper fix. The original default-path assertion is preserved as 
another theory case.
   
   ## Verification on current head (merged latest `origin/main`)
   
   - `dotnet test DubboNet.sln --no-restore --verbosity quiet`: unit tests 
**542 passed / 0 failed**. The 2 end-to-end cases were **skipped** locally 
because `DUBBONET_E2E_ENABLED` and the external services were not enabled; this 
is **not** an end-to-end pass.
   - `dotnet build DubboNet.sln -c Release --no-restore --verbosity quiet`: 
passed with 4 pre-existing warnings.
   - Targeted `dotnet format --verify-no-changes` on both changed files and 
`git diff origin/main...HEAD --check`: passed.
   
   Draft until CI runs on the latest head, including the real end-to-end 
workflow. No Nacos or protocol constant refactoring is part of this PR.
   


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to