From eebd42eae731df0f08ea49b32227761405011ba2 Mon Sep 17 00:00:00 2001 From: Trial97 Date: Fri, 2 Nov 2018 17:59:12 +0200 Subject: [PATCH] Partialy resolved rpc: can't find service for filter indexes it tests --- apier/v1/filter_indexes_it_test.go | 10 ++++------ apier/v1/filterindexecache_it_test.go | 9 +++------ 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/apier/v1/filter_indexes_it_test.go b/apier/v1/filter_indexes_it_test.go index 3d2eb7963..394f3d0cc 100644 --- a/apier/v1/filter_indexes_it_test.go +++ b/apier/v1/filter_indexes_it_test.go @@ -93,6 +93,7 @@ var sTestsFilterIndexesSV1 = []func(t *testing.T){ // Test start here func TestFIdxV1ITMySQL(t *testing.T) { tSv1ConfDIR = "tutmysql" + time.Sleep(time.Duration(2 * time.Second)) // give time for engine to start for _, stest := range sTestsFilterIndexesSV1 { t.Run(tSv1ConfDIR, stest) } @@ -112,12 +113,8 @@ func testV1FIdxLoadConfig(t *testing.T) { if tSv1Cfg, err = config.NewCGRConfigFromFolder(tSv1CfgPath); err != nil { t.Error(err) } - switch tSv1ConfDIR { - case "tutmongo": // Mongo needs more time to reset db, need to investigate - thdsDelay = 4000 - default: - thdsDelay = 1000 - } + thdsDelay = 4000 + } func testV1FIdxdxInitDataDb(t *testing.T) { @@ -145,6 +142,7 @@ func testV1FIdxRpcConn(t *testing.T) { if err != nil { t.Fatal("Could not connect to rater: ", err.Error()) } + time.Sleep(5 * time.Second) } //ThresholdProfile diff --git a/apier/v1/filterindexecache_it_test.go b/apier/v1/filterindexecache_it_test.go index b0632bee7..baf4f1e75 100644 --- a/apier/v1/filterindexecache_it_test.go +++ b/apier/v1/filterindexecache_it_test.go @@ -82,6 +82,7 @@ var sTestsFilterIndexesSV1Ca = []func(t *testing.T){ // Test start here func TestFIdxCaV1ITMySQL(t *testing.T) { tSv1ConfDIR = "tutmysql" + time.Sleep(time.Duration(2 * time.Second)) // give time for engine to start for _, stest := range sTestsFilterIndexesSV1Ca { t.Run(tSv1ConfDIR, stest) } @@ -101,12 +102,7 @@ func testV1FIdxCaLoadConfig(t *testing.T) { if tSv1Cfg, err = config.NewCGRConfigFromFolder(tSv1CfgPath); err != nil { t.Error(err) } - switch tSv1ConfDIR { - case "tutmongo": // Mongo needs more time to reset db, need to investigate - thdsDelay = 4000 - default: - thdsDelay = 1000 - } + thdsDelay = 4000 } func testV1FIdxCadxInitDataDb(t *testing.T) { @@ -134,6 +130,7 @@ func testV1FIdxCaRpcConn(t *testing.T) { if err != nil { t.Fatal("Could not connect to rater: ", err.Error()) } + time.Sleep(5 * time.Second) } func testV1FIdxCaFromFolder(t *testing.T) {