mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 10:06:24 +05:00
Remove deprecated rand.Seed function
This commit is contained in:
committed by
Dan Christian Bogos
parent
29fccbb6c7
commit
d396da9214
@@ -856,7 +856,7 @@ func TestSmgJsonCfg(t *testing.T) {
|
||||
if cfg, err := dfCgrJSONCfg.SessionSJsonCfg(); err != nil {
|
||||
t.Error(err)
|
||||
} else if !reflect.DeepEqual(eCfg, cfg) {
|
||||
t.Error(fmt.Sprintf("Expecting: %s, received: %s", utils.ToJSON(eCfg), utils.ToJSON(cfg)))
|
||||
t.Errorf("Expecting: %s, received: %s", utils.ToJSON(eCfg), utils.ToJSON(cfg))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1416,7 +1416,6 @@ func (sS *SessionS) terminateSyncSessions(toBeRemoved []string) {
|
||||
}
|
||||
var eUsage time.Duration
|
||||
if sS.cgrCfg.SessionSCfg().StaleChanMaxExtraUsage > 0 { // add extra usage
|
||||
rand.Seed(time.Now().Unix())
|
||||
eUsage += time.Duration(
|
||||
rand.Int63n(sS.cgrCfg.SessionSCfg().StaleChanMaxExtraUsage.Milliseconds()) * time.Millisecond.Nanoseconds())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user