diff --git a/apier/v1/precache_it_test.go b/apier/v1/precache_it_test.go index 9c5d0ebfe..78eaa1600 100644 --- a/apier/v1/precache_it_test.go +++ b/apier/v1/precache_it_test.go @@ -294,6 +294,10 @@ func testPrecacheGetCacheStatsAfterRestart(t *testing.T) { Items: 0, Groups: 0, }, + utils.CacheRPCConnections: { + Items: 0, + Groups: 0, + }, } if err := precacheRPC.Call(utils.CacheSv1GetCacheStats, args, &reply); err != nil { t.Error(err.Error()) diff --git a/config/config_it_test.go b/config/config_it_test.go index 9ee5102e7..576a11a55 100644 --- a/config/config_it_test.go +++ b/config/config_it_test.go @@ -465,13 +465,8 @@ func TestCGRConfigReloadERs(t *testing.T) { &FCTemplate{Tag: utils.Usage, FieldId: utils.Usage, Type: utils.META_COMPOSED, Value: NewRSRParsersMustCompile("~*req.13", true, utils.INFIELD_SEP), Mandatory: true}, } expAttr := &ERsCfg{ - Enabled: true, - SessionSConns: []*RemoteHost{ - &RemoteHost{ - Address: "127.0.0.1:2012", - Transport: utils.MetaJSON, - }, - }, + Enabled: true, + SessionSConns: []string{utils.MetaLocalHost}, Readers: []*EventReaderCfg{ &EventReaderCfg{ ID: utils.META_DEFAULT, diff --git a/config/configsanity.go b/config/configsanity.go index e211ab384..f74a6d352 100644 --- a/config/configsanity.go +++ b/config/configsanity.go @@ -410,7 +410,7 @@ func (cfg *CGRConfig) checkConfigSanity() error { // DataDB sanity checks if cfg.dataDbCfg.DataDbType == utils.INTERNAL { for key, config := range cfg.cacheCfg { - if key == utils.CacheDiameterMessages || key == utils.CacheClosedSessions { + if key == utils.CacheDiameterMessages || key == utils.CacheClosedSessions || key == utils.CacheRPCConnections { if config.Limit == 0 { return fmt.Errorf("<%s> %s needs to be != 0 when DataBD is *internal, found 0.", utils.CacheS, key) } diff --git a/engine/caches.go b/engine/caches.go index 85e5fbb04..da7d9425d 100644 --- a/engine/caches.go +++ b/engine/caches.go @@ -56,7 +56,6 @@ var precachedPartitions = utils.StringMap{ utils.CacheChargerProfiles: true, utils.CacheDispatcherProfiles: true, utils.CacheDispatcherHosts: true, - utils.CacheRPCConnections: true, utils.CacheAttributeFilterIndexes: true, utils.CacheResourceFilterIndexes: true, diff --git a/engine/libtest.go b/engine/libtest.go index 52934ceea..5bec65b40 100644 --- a/engine/libtest.go +++ b/engine/libtest.go @@ -610,5 +610,9 @@ func GetDefaultEmptyCacheStats() map[string]*ltcache.CacheStats { Items: 0, Groups: 0, }, + utils.CacheRPCConnections: { + Items: 0, + Groups: 0, + }, } }