mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-21 23:28:44 +05:00
Fixed error when ignoringErrors would continue in the iteration
This commit is contained in:
committed by
Dan Christian Bogos
parent
ee8b95e7dd
commit
b5b7934f9b
@@ -62,6 +62,7 @@ func populateCostForRoutes(ctx *context.Context, cfg *config.CGRConfig,
|
||||
utils.Logger.Warning(
|
||||
fmt.Sprintf("<%s> ignoring route with ID: %s, err: %s",
|
||||
utils.RouteS, route.ID, err.Error()))
|
||||
err = nil
|
||||
continue
|
||||
}
|
||||
err = utils.NewErrAccountS(err)
|
||||
@@ -86,6 +87,7 @@ func populateCostForRoutes(ctx *context.Context, cfg *config.CGRConfig,
|
||||
utils.Logger.Warning(
|
||||
fmt.Sprintf("<%s> ignoring route with ID: %s, err: %s",
|
||||
utils.RouteS, route.ID, err.Error()))
|
||||
err = nil
|
||||
continue
|
||||
}
|
||||
err = utils.NewErrRateS(err)
|
||||
|
||||
@@ -74,6 +74,7 @@ func (ws *LoadDistributionSorter) SortRoutes(ctx *context.Context, prflID string
|
||||
utils.Logger.Warning(
|
||||
fmt.Sprintf("<%s> ignoring route with ID: %s, err: %s",
|
||||
utils.RouteS, route.ID, err.Error()))
|
||||
err = nil
|
||||
continue
|
||||
}
|
||||
return
|
||||
|
||||
@@ -64,6 +64,7 @@ func (qos *QOSRouteSorter) SortRoutes(ctx *context.Context, prflID string, route
|
||||
utils.Logger.Warning(
|
||||
fmt.Sprintf("<%s> ignoring route with ID: %s, err: %s",
|
||||
utils.RouteS, route.ID, err.Error()))
|
||||
err = nil
|
||||
continue
|
||||
}
|
||||
return
|
||||
|
||||
@@ -195,7 +195,7 @@ func testSessVolDiscAuthorizeEventSortRoutes1Min30Sec(t *testing.T) {
|
||||
Tenant: "cgrates.org",
|
||||
ID: "testSessVolDiscAuthorizeEvent1",
|
||||
Event: map[string]interface{}{
|
||||
utils.AccountField: "sipp",
|
||||
utils.AccountField: "1001",
|
||||
utils.Category: "call",
|
||||
utils.ToR: "*voice",
|
||||
},
|
||||
@@ -211,7 +211,6 @@ func testSessVolDiscAuthorizeEventSortRoutes1Min30Sec(t *testing.T) {
|
||||
args, &rplyFirst); err != nil {
|
||||
t.Error(err)
|
||||
} else if !reflect.DeepEqual(expected, rplyFirst) {
|
||||
t.Errorf(" %T si %T", expected.RouteProfiles[0].Routes[1].SortingData["Weight"], rplyFirst.RouteProfiles[0].Routes[1].SortingData["Weight"])
|
||||
t.Errorf("Expected %+v \n, received %+v", utils.ToJSON(expected), utils.ToJSON(rplyFirst))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user