Skip to content
Snippets Groups Projects
Commit 20aed737 authored by fangyincheng's avatar fangyincheng
Browse files

Imp:fix problems

parent ea2f7eaf
No related branches found
No related tags found
No related merge requests found
......@@ -16,9 +16,9 @@ import (
)
func TestConfigLoader(t *testing.T) {
conPath, err := filepath.Abs("./consumer_config.yml")
conPath, err := filepath.Abs("./testdata/consumer_config.yml")
assert.NoError(t, err)
proPath, err := filepath.Abs("./provider_config.yml")
proPath, err := filepath.Abs("./testdata/provider_config.yml")
assert.NoError(t, err)
assert.Nil(t, consumerConfig)
......
# dubbo client yaml configure file
# pprof
pprof_enabled : true
pprof_port : 10086
# client
request_timeout : "100ms"
# connect timeout
connect_timeout : "100ms"
check: true
# application config
application_config:
organization : "ikurento.com"
name : "BDTService"
module : "dubbogo user-info client"
version : "0.0.1"
owner : "ZX"
environment : "dev"
registries :
- id: "hangzhouzk"
type: "zookeeper"
timeout : "3s"
address: "127.0.0.1:2181"
username: ""
password: ""
- id: "shanghaizk"
type: "zookeeper"
timeout : "3s"
address: "127.0.0.1:2182"
username: ""
password: ""
references:
- registries :
- "hangzhouzk"
- "shanghaizk"
protocol : "dubbo"
interface : "com.ikurento.user.UserProvider"
cluster: "failover"
methods :
- name: "GetUser"
retries: 3
protocol_conf:
dubbo:
reconnect_interval: 0
connection_number: 2
heartbeat_period: "5s"
session_timeout: "20s"
fail_fast_timeout: "5s"
pool_size: 64
pool_ttl: 600
getty_session_param:
compress_encoding: false
tcp_no_delay: true
tcp_keep_alive: true
keep_alive_period: "120s"
tcp_r_buf_size: 262144
tcp_w_buf_size: 65536
pkg_rq_size: 1024
pkg_wq_size: 512
tcp_read_timeout: "1s"
tcp_write_timeout: "5s"
wait_timeout: "1s"
max_msg_len: 1024
session_name: "client"
# dubbo server yaml configure file
# pprof
pprof_enabled : true
pprof_port : 20080
path: ""
# application config
application_config:
organization : "ikurento.com"
name : "BDTService"
module : "dubbogo user-info server"
version : "0.0.1"
owner : "ZX"
environment : "dev"
registries :
- id: "hangzhouzk"
type: "zookeeper"
timeout : "3s"
address: "127.0.0.1:2181"
username: ""
password: ""
- id: "shanghaizk"
type: "zookeeper"
timeout : "3s"
address: "127.0.0.1:2182"
username: ""
password: ""
services:
- registries:
- "hangzhouzk"
- "shanghaizk"
protocol : "dubbo"
# equivalent to interface of dubbo.xml
interface : "com.ikurento.user.UserProvider"
loadbalance: "random"
warmup: "100"
cluster: "failover"
methods:
- name: "GetUser"
retries: 1
loadbalance: "random"
protocols:
- name: "dubbo"
# while using dubbo protocol, ip cannot is 127.0.0.1, because client of java-dubbo will get 'connection refuse'
ip : "127.0.0.1"
port : 20000
#- name: "jsonrpc"
# ip: "127.0.0.1"
# port: 20001
protocol_conf:
dubbo:
session_number: 700
fail_fast_timeout: "5s"
session_timeout: "20s"
getty_session_param:
compress_encoding: false
tcp_no_delay: true
tcp_keep_alive: true
keep_alive_period: "120s"
tcp_r_buf_size: 262144
tcp_w_buf_size: 65536
pkg_rq_size: 1024
pkg_wq_size: 512
tcp_read_timeout: "1s"
tcp_write_timeout: "5s"
wait_timeout: "1s"
max_msg_len: 1024
session_name: "server"
......@@ -8,7 +8,7 @@ pprof_port : 10086
request_timeout : "100ms"
# connect timeout
connect_timeout : "100ms"
check: true
# application config
application_config:
organization : "ikurento.com"
......@@ -29,7 +29,7 @@ registries :
- id: "shanghaizk"
type: "zookeeper"
timeout : "3s"
address: "127.0.0.1:2181"
address: "127.0.0.1:2182"
username: ""
password: ""
......
......@@ -8,7 +8,7 @@ pprof_port : 10086
request_timeout : "100ms"
# connect timeout
connect_timeout : "100ms"
check: true
# application config
application_config:
organization : "ikurento.com"
......@@ -29,7 +29,7 @@ registries :
- id: "shanghaizk"
type: "zookeeper"
timeout : "3s"
address: "127.0.0.1:2181"
address: "127.0.0.1:2182"
username: ""
password: ""
......
......@@ -3,7 +3,7 @@
# pprof
pprof_enabled : true
pprof_port : 10086
check: true
# client
request_timeout : "3s"
# connect timeout
......@@ -29,7 +29,7 @@ registries :
- id: "shanghaizk"
type: "zookeeper"
timeout : "3s"
address: "127.0.0.1:2181"
address: "127.0.0.1:2182"
username: ""
password: ""
......
......@@ -3,7 +3,7 @@
# pprof
pprof_enabled : true
pprof_port : 10086
check: true
# client
request_timeout : "3s"
# connect timeout
......@@ -29,7 +29,7 @@ registries :
- id: "shanghaizk"
type: "zookeeper"
timeout : "3s"
address: "127.0.0.1:2181"
address: "127.0.0.1:2182"
username: ""
password: ""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment