Skip to content

Commit

Permalink
fix: fit dubbo url rule (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
gxcsoccer authored Nov 1, 2018
1 parent 392a4b2 commit d8186e6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/registry/zk/data_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ class ZookeeperRegistry extends Base {
}
const consumerGroup = consumer.group;
const consumerVersion = consumer.version;
const providerGroup = providerInfo.get('group');
const providerVersion = providerInfo.get('version');
const providerGroup = providerInfo.get('group') || providerInfo.get('default.group');
const providerVersion = providerInfo.get('version') || providerInfo.get('default.version');
return (!consumerGroup || consumerGroup === providerGroup) &&
(!consumerVersion || consumerVersion === providerVersion);
}
Expand Down
2 changes: 1 addition & 1 deletion test/registry/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ describe('test/registry/index.test.js', () => {
interfaceName: 'org.apache.dubbo.demo.DemoService',
version: '1.0.0',
group: 'HSF',
url: 'dubbo://127.0.0.1:12200/org.apache.dubbo.demo.DemoService?accepts=100000&appName=&application=demo-consumer&check=false&dubbo=2.0.2&dynamic=true&group=HSF&interface=org.apache.dubbo.demo.DemoService&language=nodejs&methods=sayHello&pid=45510&qos.port=33333&register.ip=192.168.1.13&revision=1.0.0&rpcVer=50400&serialization=hessian2&side=consumer&startTime=1540925808939&timeout=3000&timestamp=1540925836963&uniqueId=&version=1.0.0&weight=100',
url: 'dubbo://127.0.0.1:12200/org.apache.dubbo.demo.DemoService?accepts=100000&appName=&application=demo-consumer&check=false&dubbo=2.0.2&dynamic=true&default.group=HSF&interface=org.apache.dubbo.demo.DemoService&language=nodejs&methods=sayHello&pid=45510&qos.port=33333&register.ip=192.168.1.13&revision=1.0.0&rpcVer=50400&serialization=hessian2&side=consumer&startTime=1540925808939&timeout=3000&timestamp=1540925836963&uniqueId=&default.version=1.0.0&weight=100',
};
const reg2 = {
interfaceName: 'org.apache.dubbo.demo.DemoService',
Expand Down

0 comments on commit d8186e6

Please sign in to comment.