mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
fix tll expiration check
This commit is contained in:
@@ -58,7 +58,7 @@ func (c *Cache) cleanExpired() {
|
||||
c.mu.RUnlock()
|
||||
|
||||
en := e.Value.(*entry)
|
||||
if en.timestamp.Add(c.expiration).After(time.Now()) {
|
||||
if time.Now().After(en.timestamp.Add(c.expiration)) {
|
||||
c.mu.Lock()
|
||||
c.removeElement(e)
|
||||
c.mu.Unlock()
|
||||
|
||||
@@ -810,7 +810,7 @@ func TestLoadRatingPlans(t *testing.T) {
|
||||
},
|
||||
}
|
||||
if !reflect.DeepEqual(rplan.Ratings, expected.Ratings) {
|
||||
t.Errorf("Error loading destination rate timing: %+v", rplan.Ratings)
|
||||
t.Errorf("Error loading destination rate timing: %+v", utils.ToIJSON(rplan.Ratings))
|
||||
/*for tag, key := range rplan.Ratings {
|
||||
log.Print(tag, key)
|
||||
}*/
|
||||
|
||||
Reference in New Issue
Block a user