pinxiong commented on a change in pull request #9138:
URL: https://github.com/apache/dubbo/pull/9138#discussion_r743423904
##########
File path:
dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/integration/multiple/exportmetadata/MultipleRegistryCenterExportMetadataIntegrationTest.java
##########
@@ -99,13 +91,9 @@ public void setUp() throws Exception {
DubboBootstrap.getInstance()
.application(new ApplicationConfig(PROVIDER_APPLICATION_NAME))
.protocol(new ProtocolConfig(PROTOCOL_NAME))
- .service(serviceConfig);
- for (RegistryCenter.Instance instance :
registryCenter.getRegistryCenterInstance()) {
- DubboBootstrap.getInstance().registry(new
RegistryConfig(String.format("%s://%s:%s",
- instance.getType(),
- instance.getHostname(),
- instance.getPort())));
- }
+ .service(serviceConfig)
+ .registry(new RegistryConfig("zookeeper://127.0.0.1:2181"))
+ .registry(new RegistryConfig("zookeeper://127.0.0.1:2182"));
Review comment:
The best way is to define two client ports (which might not be `2181`
and `2182`) and quote them when using. However, there are so many hard code in
unit test. So, it's very diffcult to change anywhere.
such as some zookeeper connection string in properties file
```java
dubbo.registry.address=zookeeper://127.0.0.1:2181?registry-type=service
biz.group=greeting
biz.group2=group2
dubbo.call-timeout=2000
```
--
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]