diff --git a/data/tariffplans/testtp/Actions.csv b/data/tariffplans/testtp/Actions.csv index 6396c2c1c..fb40373b2 100644 --- a/data/tariffplans/testtp/Actions.csv +++ b/data/tariffplans/testtp/Actions.csv @@ -9,8 +9,8 @@ TOPUP_DATA_r,*topup,,,,*monetary,*out,,DATA_DEST,,,*unlimited,,5000000,10,false, TOPUP_DATA_r,*topup,,,,*data,*out,,DATA_DEST,datar,,*unlimited,,50000000000,10,false,false,10 TOPUP_VOICE,*topup,,,,*voice,*out,,GERMANY_MOBILE,,,*unlimited,,50000,10,false,false,10 TOPUP_NEG,*topup,,,,*voice,*out,,GERMANY;!GERMANY_MOBILE,*zero1m,,*unlimited,,100,10,false,false,10 -RPC,*cgr_rpc,"{""Address"": ""localhost:2013"",""Transport"":""*gob"",""Method"":""ApierV2.SetAccount"",""Attempts"":1,""Async"" :false,""Params"":{""Account"":""rpc"",""Tenant"":""cgrates.org""}}",,,,,,,,,,,,,,, +RPC,*cgr_rpc,"{""Address"": ""localhost:2013"",""Transport"":""gob"",""Method"":""ApierV2.SetAccount"",""Attempts"":1,""Async"" :false,""Params"":{""Account"":""rpc"",""Tenant"":""cgrates.org""}}",,,,,,,,,,,,,,, DID,*debit,,,,*monetary,*out,,*any,,,*unlimited,*any,"{""Method"":""*incremental"",""Params"":{""Units"":1, ""Interval"":""month"",""Increment"":""day""}}",10.0,,,10.0 DID,*cdrlog,"{""action"":""^DID"",""prev_balance"":""BalanceValue""}",,,*monetary,*out,,*any,,,*unlimited,,,10.0,,,10.0 -RPC_DEST,*cgr_rpc,"{""Address"": ""localhost:2013"",""Transport"":""*gob"",""Method"":""ApierV2.SetDestination"",""Attempts"":1,""Async"" :false,""Params"":{""Id"":""<<.Account.GetID>>"",""Prefixes"":[""1"",""2"",""3""]}}",,,,,,,,,,,,,,, -RPC_CDRSTATS,*cgr_rpc,"{""Address"": ""localhost:2013"",""Transport"":""*gob"",""Method"":""CDRStatsV1.AddQueue"",""Attempts"":1,""Async"" :false,""Params"":{""Id"":""qtest""}}",,,,,,,,,,,,,,, +RPC_DEST,*cgr_rpc,"{""Address"": ""localhost:2013"",""Transport"":""gob"",""Method"":""ApierV2.SetDestination"",""Attempts"":1,""Async"" :false,""Params"":{""Id"":""<<.Account.GetID>>"",""Prefixes"":[""1"",""2"",""3""]}}",,,,,,,,,,,,,,, +RPC_CDRSTATS,*cgr_rpc,"{""Address"": ""localhost:2013"",""Transport"":""gob"",""Method"":""CDRStatsV1.AddQueue"",""Attempts"":1,""Async"" :false,""Params"":{""Id"":""qtest""}}",,,,,,,,,,,,,,, diff --git a/general_tests/a1_it_test.go b/general_tests/a1_it_test.go index df3abbfca..b81a89827 100644 --- a/general_tests/a1_it_test.go +++ b/general_tests/a1_it_test.go @@ -201,6 +201,7 @@ func TestA1itDataSession1(t *testing.T) { } else if rpl != utils.OK { t.Errorf("Received reply: %s", rpl) } + time.Sleep(time.Duration(20) * time.Millisecond) var cdrs []*engine.ExternalCDR req := utils.RPCCDRsFilter{RunIDs: []string{utils.META_DEFAULT}} if err := a1rpc.Call("ApierV2.GetCdrs", req, &cdrs); err != nil { diff --git a/general_tests/cdrs_onlexp_it_test.go b/general_tests/cdrs_onlexp_it_test.go index 59501bc7b..9c674cc6b 100644 --- a/general_tests/cdrs_onlexp_it_test.go +++ b/general_tests/cdrs_onlexp_it_test.go @@ -110,6 +110,7 @@ func TestCDRsOnExpHttpCdrReplication(t *testing.T) { t.Fatal("Could not connect to rater: ", err.Error()) } // ToDo: Fix cdr_http to be compatible with rest of processCdr methods + time.Sleep(time.Duration(20) * time.Millisecond) var rcvedCdrs []*engine.ExternalCDR if err := cdrsSlaveRpc.Call("ApierV2.GetCdrs", utils.RPCCDRsFilter{CGRIDs: []string{testCdr1.CGRID}, RunIDs: []string{utils.META_DEFAULT}}, &rcvedCdrs); err != nil { diff --git a/general_tests/tp_it_test.go b/general_tests/tp_it_test.go index 37db94501..f6a1ac226 100644 --- a/general_tests/tp_it_test.go +++ b/general_tests/tp_it_test.go @@ -219,7 +219,7 @@ func TestTpExecuteActionCgrRpc(t *testing.T) { t.Errorf("Calling ExecuteAction got reply: %s", reply) } var acnt engine.Account - attrs := &utils.AttrGetAccount{Tenant: "cgrates.org", Account: "rpc"} + attrs := &utils.AttrGetAccount{Tenant: "cgrates.org", Account: "1013"} if err := tpRPC.Call("ApierV2.GetAccount", attrs, &acnt); err != nil { t.Error("Got error on ApierV2.GetAccount: ", err.Error()) } @@ -237,7 +237,7 @@ func TestTpExecuteActionCgrRpcAcc(t *testing.T) { t.Errorf("Calling ExecuteAction got reply: %s", reply) } var dests []*engine.Destination - attrs := &v2.AttrGetDestinations{DestinationIDs: []string{"1016"}} + attrs := &v2.AttrGetDestinations{DestinationIDs: []string{}} if err := tpRPC.Call("ApierV2.GetDestinations", attrs, &dests); err != nil { t.Error("Got error on ApierV2.GetDestinations: ", err.Error()) } @@ -253,6 +253,7 @@ func TestTpExecuteActionCgrRpcCdrStats(t *testing.T) { t.Errorf("Calling ExecuteAction got reply: %s", reply) } var queue engine.StatsQueue + time.Sleep(20 * time.Millisecond) if err := tpRPC.Call("CDRStatsV1.GetQueue", "qtest", &queue); err != nil { t.Error("Got error on CDRStatsV1.GetQueue: ", err.Error()) }