mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Fixed integration test in registrarc
This commit is contained in:
committed by
Dan Christian Bogos
parent
dfd179ba4d
commit
d39c48377f
@@ -103,11 +103,6 @@ func (dspS *RegistrarCService) ServiceName() string {
|
||||
|
||||
// ShouldRun returns if the service should be running
|
||||
func (dspS *RegistrarCService) ShouldRun() bool {
|
||||
if len(dspS.cfg.RegistrarCCfg().RPC.RegistrarSConns) != 0 {
|
||||
return true
|
||||
}
|
||||
if len(dspS.cfg.RegistrarCCfg().Dispatchers.RegistrarSConns) != 0 {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
return len(dspS.cfg.RegistrarCCfg().RPC.RegistrarSConns) != 0 ||
|
||||
len(dspS.cfg.RegistrarCCfg().Dispatchers.RegistrarSConns) != 0
|
||||
}
|
||||
|
||||
@@ -89,9 +89,10 @@ func TestDispatcherHReload(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Errorf("\nExpecting <nil>,\n Received <%+v>", err)
|
||||
}
|
||||
cfg.RegistrarCCfg().RPC.RegistrarSConns = nil
|
||||
cfg.RegistrarCCfg().Dispatchers.RegistrarSConns = nil
|
||||
cfg.GetReloadChan(config.RegistrarCJson) <- struct{}{}
|
||||
time.Sleep(10 * time.Millisecond)
|
||||
srv.Shutdown()
|
||||
if srv.IsRunning() {
|
||||
t.Errorf("Expected service to be down")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user