From 70cd4c6d9ad3fa222c656f94813b86dbeb5763cd Mon Sep 17 00:00:00 2001 From: Radu Ioan Fericean Date: Tue, 8 Mar 2016 23:09:20 +0200 Subject: [PATCH] added sleep time for test scheduler execution --- general_tests/tutorial_local_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/general_tests/tutorial_local_test.go b/general_tests/tutorial_local_test.go index c48066596..5d4f08f58 100644 --- a/general_tests/tutorial_local_test.go +++ b/general_tests/tutorial_local_test.go @@ -1211,7 +1211,6 @@ func TestTutLocalSetAccount(t *testing.T) { t.Error("Disabled should be set") } } - attrs = &v2.AttrSetAccount{Tenant: "cgrates.org", Account: "tutacnt1", ActionPlanIDs: &[]string{"PACKAGE_1001"}, ActionTriggerIDs: &[]string{"CDRST1_WARN"}, AllowNegative: utils.BoolPointer(true), Disabled: utils.BoolPointer(true), ReloadScheduler: true} if err := tutLocalRpc.Call("ApierV2.SetAccount", attrs, &reply); err != nil { @@ -1219,6 +1218,7 @@ func TestTutLocalSetAccount(t *testing.T) { } else if reply != "OK" { t.Errorf("Calling ApierV2.SetAccount received: %s", reply) } + time.Sleep(100*time.Millisecond + time.Duration(*waitRater)*time.Millisecond) // Give time for scheduler to execute topups if err := tutLocalRpc.Call("ApierV2.GetAccounts", utils.AttrGetAccounts{Tenant: attrs.Tenant, AccountIds: []string{attrs.Account}}, &acnts); err != nil { t.Error(err) } else if len(acnts) != 1 {