mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 10:06:24 +05:00
Add flaky constraint to random routes unit tests
Also increase margin of error for guardian tests 5ms->10ms.
This commit is contained in:
committed by
Dan Christian Bogos
parent
73c54cdcf2
commit
4964a462cf
@@ -52,8 +52,8 @@ func TestGuardianMultipleKeys(t *testing.T) {
|
||||
sg.Wait()
|
||||
execTime := time.Since(tStart)
|
||||
want := 10 * time.Millisecond * time.Duration(maxIter)
|
||||
if diff := execTime - want; diff < 0 || diff > 5*time.Millisecond {
|
||||
t.Errorf("total Guard duration for %d iterations over %d keys=%v: got %v want %v (diff %v, margin 5ms)",
|
||||
if diff := execTime - want; diff < 0 || diff > 10*time.Millisecond {
|
||||
t.Errorf("total Guard duration for %d iterations over %d keys=%v: got %v want %v (diff %v, margin 10ms)",
|
||||
maxIter, len(keys), keys, execTime, want, diff)
|
||||
}
|
||||
Guardian.lkMux.Lock()
|
||||
|
||||
Reference in New Issue
Block a user