Updated cache reload

This commit is contained in:
Trial97
2021-07-29 10:08:04 +03:00
committed by Dan Christian Bogos
parent 43cc17328f
commit 922eb77caf
5 changed files with 24 additions and 22 deletions

View File

@@ -57,7 +57,7 @@ type CoreService struct {
shdWg *sync.WaitGroup
stopMemPrf chan struct{}
shdChan *utils.SyncedChan
fileMEM string
fileMEM string
fileCPU io.Closer
fileMx sync.Mutex
}

View File

@@ -40,7 +40,7 @@ func TestNewCoreService(t *testing.T) {
shdChan := utils.NewSyncedChan()
stopMemPrf := make(chan struct{})
expected := &CoreService{
fileMEM: "/tmp",
fileMEM: "/tmp",
shdWg: shdWg,
shdChan: shdChan,
stopMemPrf: stopMemPrf,
@@ -48,7 +48,7 @@ func TestNewCoreService(t *testing.T) {
CapsStats: sts,
}
rcv := NewCoreService(cfgDflt, caps, nil,"/tmp", stopchan, shdWg, stopMemPrf, shdChan)
rcv := NewCoreService(cfgDflt, caps, nil, "/tmp", stopchan, shdWg, stopMemPrf, shdChan)
if !reflect.DeepEqual(expected, rcv) {
t.Errorf("Expected %+v, received %+v", utils.ToJSON(expected), utils.ToJSON(rcv))
}
@@ -63,7 +63,7 @@ func TestCoreServiceStatus(t *testing.T) {
caps := engine.NewCaps(1, utils.MetaBusy)
stopChan := make(chan struct{}, 1)
cores := NewCoreService(cfgDflt, caps, nil,"/tmp", stopChan, nil, nil, nil)
cores := NewCoreService(cfgDflt, caps, nil, "/tmp", stopChan, nil, nil, nil)
args := &utils.TenantWithAPIOpts{
Tenant: "cgrates.org",
APIOpts: map[string]interface{}{},