Skip to content

Commit

Permalink
[FAB-8956] Reference correct config sections
Browse files Browse the repository at this point in the history
Change-Id: Iff2e46ba4ac7413267e7c1e65cac3fa184ccdab2
Signed-off-by: Divyank Katira <Divyank.Katira@securekey.com>
  • Loading branch information
d1vyank committed Mar 19, 2018
1 parent 6ab7137 commit ef2ffa7
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions pkg/core/config/config.go
Expand Up @@ -573,21 +573,21 @@ func (c *Config) getTimeout(tType core.TimeoutType) time.Duration {
case core.OrdererResponse:
timeout = c.configViper.GetDuration("client.orderer.timeout.response")
case core.ChannelConfigRefresh:
timeout = c.configViper.GetDuration("client.global.timeout.cache.channelConfig")
timeout = c.configViper.GetDuration("client.global.cache.channelConfig")
case core.ChannelMembershipRefresh:
timeout = c.configViper.GetDuration("client.global.timeout.cache.channelMembership")
timeout = c.configViper.GetDuration("client.global.cache.channelMembership")
case core.CacheSweepInterval: // EXPERIMENTAL - do we need this to be configurable?
timeout = c.configViper.GetDuration("client.cache.interval.sweep")
if timeout == 0 {
timeout = defaultCacheSweepInterval
}
case core.ConnectionIdle:
timeout = c.configViper.GetDuration("client.global.timeout.cache.connectionIdle")
timeout = c.configViper.GetDuration("client.global.cache.connectionIdle")
if timeout == 0 {
timeout = defaultConnIdleTimeout
}
case core.EventServiceIdle:
timeout = c.configViper.GetDuration("client.global.timeout.cache.eventServiceIdle")
timeout = c.configViper.GetDuration("client.global.cache.eventServiceIdle")
if timeout == 0 {
timeout = defaultEventServiceIdleTimeout
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/core/config/config_test.go
Expand Up @@ -389,8 +389,8 @@ func TestTimeouts(t *testing.T) {
configImpl.configViper.Set("client.global.timeout.query", "7h")
configImpl.configViper.Set("client.global.timeout.execute", "8h")
configImpl.configViper.Set("client.global.timeout.resmgmt", "118s")
configImpl.configViper.Set("client.global.timeout.cache.connectionIdle", "1m")
configImpl.configViper.Set("client.global.timeout.cache.eventServiceIdle", "2m")
configImpl.configViper.Set("client.global.cache.connectionIdle", "1m")
configImpl.configViper.Set("client.global.cache.eventServiceIdle", "2m")
configImpl.configViper.Set("client.orderer.timeout.response", "6s")

t1 := configImpl.TimeoutOrDefault(api.EndorserConnection)
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/config/config_pkcs11_test.yaml
Expand Up @@ -60,7 +60,7 @@ client:
resmgmt: 60s
cache:
connectionIdle: 30s
eventServiceIdle: 30s
eventServiceIdle: 2m
channelConfig: 60s
channelMembership: 30s

Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/config/config_revoke_test.yaml
Expand Up @@ -61,7 +61,7 @@ client:
resmgmt: 60s
cache:
connectionIdle: 30s
eventServiceIdle: 500ms
eventServiceIdle: 2m
channelConfig: 60s
channelMembership: 30s

Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/config/config_test.yaml
Expand Up @@ -61,7 +61,7 @@ client:
resmgmt: 60s
cache:
connectionIdle: 30s
eventServiceIdle: 500ms
eventServiceIdle: 2m
channelConfig: 60s
channelMembership: 30s

Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/config/config_test_local.yaml
Expand Up @@ -63,7 +63,7 @@ client:
resmgmt: 60s
cache:
connectionIdle: 30s
eventServiceIdle: 500ms
eventServiceIdle: 2m
channelConfig: 60s
channelMembership: 30s

Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/config/config_test_no_orderer.yaml
Expand Up @@ -61,7 +61,7 @@ client:
resmgmt: 60s
cache:
connectionIdle: 30s
eventServiceIdle: 30s
eventServiceIdle: 2m
channelConfig: 60s
channelMembership: 30s

Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/config/config_test_no_orderer_local.yaml
Expand Up @@ -63,7 +63,7 @@ client:
resmgmt: 60s
cache:
connectionIdle: 30s
eventServiceIdle: 30s
eventServiceIdle: 2m
channelConfig: 60s
channelMembership: 30s

Expand Down

0 comments on commit ef2ffa7

Please sign in to comment.