mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-12 02:26:26 +05:00
Removed unused InternalTtl
This commit is contained in:
committed by
Dan Christian Bogos
parent
21c880e1da
commit
bbc34b1f77
@@ -46,7 +46,6 @@ const CGRATES_CFG_JSON = `
|
||||
"reconnects": -1, // number of retries in case of connection lost
|
||||
"connect_timeout": "1s", // consider connection unsuccessful on timeout, 0 to disable the feature
|
||||
"reply_timeout": "2s", // consider connection down for replies taking longer than this value
|
||||
"internal_ttl": "5s", // maximum duration to wait for internal connections before giving up
|
||||
"locking_timeout": "0", // timeout internal locks to avoid deadlocks
|
||||
"digest_separator": ",", // separator to use in replies containing data digests
|
||||
"digest_equal": ":", // equal symbol used in case of digests
|
||||
|
||||
@@ -56,7 +56,6 @@ func TestDfGeneralJsonCfg(t *testing.T) {
|
||||
Reconnects: utils.IntPointer(-1),
|
||||
Connect_timeout: utils.StringPointer("1s"),
|
||||
Reply_timeout: utils.StringPointer("2s"),
|
||||
Internal_ttl: utils.StringPointer("5s"),
|
||||
Locking_timeout: utils.StringPointer("0"),
|
||||
Digest_separator: utils.StringPointer(","),
|
||||
Digest_equal: utils.StringPointer(":"),
|
||||
|
||||
@@ -364,9 +364,6 @@ func TestCgrCfgJSONDefaultsGeneral(t *testing.T) {
|
||||
if cgrCfg.GeneralCfg().ReplyTimeout != 2*time.Second {
|
||||
t.Errorf("Expected: 2s, received: %+v", cgrCfg.GeneralCfg().ReplyTimeout)
|
||||
}
|
||||
if cgrCfg.GeneralCfg().InternalTtl != 5*time.Second {
|
||||
t.Errorf("Expected: 2m, received: %+v", cgrCfg.GeneralCfg().InternalTtl)
|
||||
}
|
||||
if cgrCfg.GeneralCfg().LockingTimeout != 0 {
|
||||
t.Errorf("Expected: 0, received: %+v", cgrCfg.GeneralCfg().LockingTimeout)
|
||||
}
|
||||
|
||||
@@ -45,7 +45,6 @@ type GeneralCfg struct {
|
||||
Reconnects int // number of recconect attempts in case of connection lost <-1 for infinite | nb>
|
||||
ConnectTimeout time.Duration // timeout for RPC connection attempts
|
||||
ReplyTimeout time.Duration // timeout replies if not reaching back
|
||||
InternalTtl time.Duration // maximum duration to wait for internal connections before giving up
|
||||
LockingTimeout time.Duration // locking mechanism timeout to avoid deadlocks
|
||||
DigestSeparator string //
|
||||
DigestEqual string //
|
||||
@@ -116,11 +115,6 @@ func (gencfg *GeneralCfg) loadFromJsonCfg(jsnGeneralCfg *GeneralJsonCfg) (err er
|
||||
if jsnGeneralCfg.Default_caching != nil {
|
||||
gencfg.DefaultCaching = *jsnGeneralCfg.Default_caching
|
||||
}
|
||||
if jsnGeneralCfg.Internal_ttl != nil {
|
||||
if gencfg.InternalTtl, err = utils.ParseDurationWithNanosecs(*jsnGeneralCfg.Internal_ttl); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if jsnGeneralCfg.Locking_timeout != nil {
|
||||
if gencfg.LockingTimeout, err = utils.ParseDurationWithNanosecs(*jsnGeneralCfg.Locking_timeout); err != nil {
|
||||
return err
|
||||
|
||||
@@ -56,7 +56,6 @@ func TestGeneralCfgloadFromJsonCfg(t *testing.T) {
|
||||
"connect_timeout": "1s", // consider connection unsuccessful on timeout, 0 to disable the feature
|
||||
"reply_timeout": "2s", // consider connection down for replies taking longer than this value
|
||||
"response_cache_ttl": "0s", // the life span of a cached response
|
||||
"internal_ttl": "2m", // maximum duration to wait for internal connections before giving up
|
||||
"locking_timeout": "0", // timeout internal locks to avoid deadlocks
|
||||
"digest_separator": ",",
|
||||
"digest_equal": ":",
|
||||
@@ -80,8 +79,6 @@ func TestGeneralCfgloadFromJsonCfg(t *testing.T) {
|
||||
Reconnects: -1,
|
||||
ConnectTimeout: time.Duration(1 * time.Second),
|
||||
ReplyTimeout: time.Duration(2 * time.Second),
|
||||
InternalTtl: time.Duration(2 * time.Minute),
|
||||
LockingTimeout: time.Duration(0),
|
||||
DigestSeparator: ",",
|
||||
DigestEqual: ":",
|
||||
}
|
||||
|
||||
@@ -38,7 +38,6 @@ type GeneralJsonCfg struct {
|
||||
Reconnects *int
|
||||
Connect_timeout *string
|
||||
Reply_timeout *string
|
||||
Internal_ttl *string
|
||||
Locking_timeout *string
|
||||
Digest_separator *string
|
||||
Digest_equal *string
|
||||
|
||||
@@ -117,7 +117,6 @@ func TestMfEnvReaderITRead(t *testing.T) {
|
||||
Reconnects: -1,
|
||||
ConnectTimeout: time.Duration(1 * time.Second),
|
||||
ReplyTimeout: time.Duration(2 * time.Second),
|
||||
InternalTtl: time.Duration(2 * time.Minute),
|
||||
LockingTimeout: time.Duration(0),
|
||||
DigestSeparator: ",",
|
||||
DigestEqual: ":",
|
||||
|
||||
Reference in New Issue
Block a user