Correctly use RALs conns in case of SessionS refund

This commit is contained in:
TeoV
2020-10-20 13:28:19 +03:00
committed by Dan Christian Bogos
parent a2144f6867
commit 1f9f052226
2 changed files with 3 additions and 3 deletions

View File

@@ -648,7 +648,7 @@ func (sS *SessionS) roundCost(s *Session, sRunIdx int) (err error) {
cd.RunID = runID
cd.Increments = roundIncrements
var response float64
if err = sS.connMgr.Call(sS.cgrCfg.SessionSCfg().ResSConns, nil,
if err = sS.connMgr.Call(sS.cgrCfg.SessionSCfg().RALsConns, nil,
utils.ResponderRefundRounding,
&engine.CallDescriptorWithArgDispatcher{CallDescriptor: cd},
&response); err != nil {

View File

@@ -916,7 +916,7 @@ func testSessionsVoiceSessionTTL(t *testing.T) {
t.Errorf("Expected: %f, received: %f", eAcntVal, acnt.BalanceMap[utils.MONETARY].GetTotalValue())
}
time.Sleep(200 * time.Millisecond)
eAcntVal = 4.0567 // rounding issue; old values : 4.0565 , 4.0566
eAcntVal = 4.0566 // rounding issue; old values : 4.0565 , 4.0566
if err := sessionsRPC.Call(utils.APIerSv2GetAccount, attrs, &acnt); err != nil {
t.Error(err)
} else if acnt.BalanceMap[utils.MONETARY].GetTotalValue() != eAcntVal {
@@ -933,7 +933,7 @@ func testSessionsVoiceSessionTTL(t *testing.T) {
if cdrs[0].Usage != "2m30.05s" {
t.Errorf("Unexpected CDR Usage received, cdr: %v %+v ", cdrs[0].Usage, cdrs[0])
}
if cdrs[0].Cost != 1.5333 {
if cdrs[0].Cost != 1.5332 {
t.Errorf("Unexpected CDR Cost received, cdr: %v %+v ", cdrs[0].Cost, cdrs[0])
}
}