mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 10:06:24 +05:00
Removed warnings from go staticcheck
This commit is contained in:
committed by
Dan Christian Bogos
parent
529430bd4d
commit
c2dacc42c1
@@ -49,7 +49,7 @@ func TestGuardianMultipleKeys(t *testing.T) {
|
||||
}
|
||||
sg.Wait()
|
||||
mustExecDur := time.Duration(maxIter*100) * time.Millisecond
|
||||
if execTime := time.Now().Sub(tStart); execTime < mustExecDur ||
|
||||
if execTime := time.Since(tStart); execTime < mustExecDur ||
|
||||
execTime > mustExecDur+100*time.Millisecond {
|
||||
t.Errorf("Execution took: %v", execTime)
|
||||
}
|
||||
@@ -78,7 +78,7 @@ func TestGuardianTimeout(t *testing.T) {
|
||||
}
|
||||
sg.Wait()
|
||||
mustExecDur := time.Duration(maxIter*10) * time.Millisecond
|
||||
if execTime := time.Now().Sub(tStart); execTime < mustExecDur ||
|
||||
if execTime := time.Since(tStart); execTime < mustExecDur ||
|
||||
execTime > mustExecDur+100*time.Millisecond {
|
||||
t.Errorf("Execution took: %v", execTime)
|
||||
}
|
||||
@@ -155,7 +155,7 @@ func TestGuardianGuardIDs(t *testing.T) {
|
||||
// test lock without timer
|
||||
refID := Guardian.GuardIDs("", 0, lockIDs...)
|
||||
|
||||
if totalLockDur := time.Now().Sub(tStart); totalLockDur < lockDur {
|
||||
if totalLockDur := time.Since(tStart); totalLockDur < lockDur {
|
||||
t.Errorf("Lock duration too small")
|
||||
}
|
||||
time.Sleep(30 * time.Millisecond)
|
||||
|
||||
Reference in New Issue
Block a user