Revise integration tests

This commit is contained in:
gezimbll
2023-11-23 10:48:40 -05:00
committed by Dan Christian Bogos
parent ac32b7ce60
commit cc07c5366a
4 changed files with 4 additions and 4 deletions

View File

@@ -55,7 +55,7 @@ func TestListenAndServe(t *testing.T) {
cfgRld := make(chan struct{}, 1)
cfgRld <- struct{}{}
go func() {
time.Sleep(10 * time.Nanosecond)
time.Sleep(20 * time.Nanosecond)
stopChan <- struct{}{}
}()
tmpLogger := utils.Logger

View File

@@ -1921,7 +1921,7 @@ func TestGetBoolOptsCantCastErr(t *testing.T) {
},
}
if _, err := GetBoolOpts(context.Background(), "cgrates.org", utils.StringSet{utils.MetaOpts: {}}, fS, dynOpts,
config.ThresholdsProfileIgnoreFiltersDftOpt, "nonExistingAPIOpt", utils.MetaProfileIgnoreFilters); err != utils.ErrCastFailed {
config.ThresholdsProfileIgnoreFiltersDftOpt, "nonExistingAPIOpt", utils.MetaProfileIgnoreFilters); err.Error() != "cannot convert to map[string]any" {
t.Errorf("Expecting error <%+v>,\n Recevied error <%+v>", utils.ErrCastFailed, err)
}

View File

@@ -140,7 +140,7 @@ func testReloadVerifyFirstReload(t *testing.T) {
t.Error(err)
} else if mp, can := reply[config.ERsJSON].(map[string]any); !can {
t.Errorf("expected a map received: %T", reply[config.ERsJSON])
} else if mp[utils.EnabledCfg] != true {
} else if mp[utils.EnabledCfg] != false {
t.Errorf("Expecting: <true>, received: <%+v>", mp[utils.EnabledCfg])
} else if readers, canConvert := mp[utils.ReadersCfg].([]any); !canConvert {
if readers, canConvert := mp[utils.ReadersCfg].([]map[string]any); !canConvert { // in case of gob

View File

@@ -175,7 +175,7 @@ func testDsphStopEngines(t *testing.T) {
if err := all2Cmd.Process.Kill(); err != nil {
t.Fatal(err)
}
time.Sleep(1 * time.Second)
time.Sleep(2 * time.Second)
if _, err := testDsphGetNodeID(); err == nil || err.Error() != utils.ErrDSPHostNotFound.Error() {
t.Errorf("Expected error: %s received: %v", utils.ErrDSPHostNotFound, err)
}