From d396da92149244648170e3c28f3bee853dc6c550 Mon Sep 17 00:00:00 2001 From: ionutboangiu Date: Mon, 2 Oct 2023 08:36:41 -0400 Subject: [PATCH] Remove deprecated rand.Seed function --- config/config_json_test.go | 2 +- sessions/sessions.go | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/config/config_json_test.go b/config/config_json_test.go index 5db93c57b..61137fe38 100644 --- a/config/config_json_test.go +++ b/config/config_json_test.go @@ -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)) } } diff --git a/sessions/sessions.go b/sessions/sessions.go index 467a447c3..896100853 100644 --- a/sessions/sessions.go +++ b/sessions/sessions.go @@ -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()) }