mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-24 16:48:45 +05:00
Updated integration tests
This commit is contained in:
@@ -28,6 +28,7 @@ import (
|
||||
"github.com/cgrates/ltcache"
|
||||
)
|
||||
|
||||
// Cache is the global cache used
|
||||
var Cache *ltcache.TransCache
|
||||
|
||||
func init() {
|
||||
@@ -60,7 +61,7 @@ type CacheS struct {
|
||||
pcItems map[string]chan struct{} // signal precaching
|
||||
}
|
||||
|
||||
// GetChannel returns the channel used to signal precaching
|
||||
// GetPrecacheChannel returns the channel used to signal precaching
|
||||
func (chS *CacheS) GetPrecacheChannel(chID string) chan struct{} {
|
||||
return chS.pcItems[chID]
|
||||
}
|
||||
@@ -81,7 +82,7 @@ func (chS *CacheS) Precache() (err error) {
|
||||
utils.CacheInstanceToPrefix[cacheID], nil,
|
||||
false)
|
||||
if errCache != nil {
|
||||
errChan <- errCache
|
||||
errChan <- fmt.Errorf("precaching cacheID <%s>, got error: %s", cacheID, errCache)
|
||||
}
|
||||
close(chS.pcItems[cacheID])
|
||||
wg.Done()
|
||||
|
||||
@@ -170,7 +170,7 @@ func (cdrS *CDRServer) rateCDR(cdr *CDRWithArgDispatcher) ([]*CDR, error) {
|
||||
if err == nil && len(smCosts) != 0 {
|
||||
break
|
||||
}
|
||||
if i != 3 {
|
||||
if i <= cdrS.cgrCfg.CdrsCfg().SMCostRetries-1 {
|
||||
time.Sleep(time.Duration(fib()) * time.Second)
|
||||
}
|
||||
}
|
||||
@@ -486,7 +486,7 @@ func (cdrS *CDRServer) processEvent(ev *utils.CGREventWithArgDispatcher,
|
||||
me.GetStringIgnoreErrors(utils.CGRID),
|
||||
me.GetStringIgnoreErrors(utils.RunID),
|
||||
)
|
||||
if Cache.HasItem(utils.CacheCDRIDs, uID) {
|
||||
if Cache.HasItem(utils.CacheCDRIDs, uID) && !reRate {
|
||||
utils.Logger.Warning(
|
||||
fmt.Sprintf("<%s> error: <%s> processing event %+v with %s",
|
||||
utils.CDRs, utils.ErrExists, utils.ToJSON(cgrEv), utils.CacheS))
|
||||
|
||||
Reference in New Issue
Block a user