Tested different cases for index health

This commit is contained in:
porosnicuadrian
2021-08-18 16:54:18 +03:00
committed by Dan Christian Bogos
parent 674f3a8293
commit 027e0e1f7c
3 changed files with 1002 additions and 10 deletions

View File

@@ -53,8 +53,7 @@ var (
testV1FIdxGetThresholdsIndexesHealth,
testV1FIdxGetResourcesIndexesHealth,
testV1FIdxGetStatsIndexesHealth,
testV1FIdxGetRoutesIndexesHealth,
testV1FIdxGetSupplierIndexesHealth,
testV1FIdxGetChargersIndexesHealth,
testV1FIdxGetAttributesIndexesHealth,
testV1FIdxCacheClear,
@@ -485,7 +484,7 @@ func testV1FIdxGetStatsIndexesHealth(t *testing.T) {
}
}
func testV1FIdxGetRoutesIndexesHealth(t *testing.T) {
func testV1FIdxGetSupplierIndexesHealth(t *testing.T) {
// set another routes profile different than the one from tariffplan
rPrf := &SupplierWithCache{
SupplierProfile: &engine.SupplierProfile{

File diff suppressed because it is too large Load Diff

View File

@@ -59,12 +59,12 @@ type SessionService struct {
rpcv1 *v1.SessionSv1
connChan chan rpcclient.ClientConnector
// in order to stop the bircp server if necesary
// in order to stop the birpc server if necessary
bircpEnabled bool
connMgr *engine.ConnManager
}
// Start should handle the sercive start
// Start should handle the service start
func (smg *SessionService) Start() (err error) {
if smg.IsRunning() {
return utils.ErrServiceAlreadyRunning
@@ -79,7 +79,7 @@ func (smg *SessionService) Start() (err error) {
defer smg.Unlock()
smg.sm = sessions.NewSessionS(smg.cfg, datadb, smg.connMgr)
//start sync session in a separate gorutine
// start sync session in a separate goroutine
go func(sm *sessions.SessionS) {
if err = sm.ListenAndServe(smg.exitChan); err != nil {
utils.Logger.Err(fmt.Sprintf("<%s> error: %s!", utils.SessionS, err))
@@ -104,7 +104,7 @@ func (smg *SessionService) Start() (err error) {
for method, handler := range smg.rpcv1.Handlers() {
smg.server.BiRPCRegisterName(method, handler)
}
// run this in it's own gorutine
// run this in it's own goroutine
go func() {
if err := smg.server.ServeBiJSON(smg.cfg.SessionSCfg().ListenBijson, smg.sm.OnBiJSONConnect, smg.sm.OnBiJSONDisconnect); err != nil {
utils.Logger.Err(fmt.Sprintf("<%s> serve BiRPC error: %s!", utils.SessionS, err))