From c6f41d7003b80ec82a1e78f38aaf104d15f72901 Mon Sep 17 00:00:00 2001 From: Trial97 Date: Thu, 28 Jan 2021 16:26:43 +0200 Subject: [PATCH] Updated Kafka reader --- console/trigger_remove_test.go | 1 - data/conf/samples/cdrsexport_internal/cgrates.json | 2 +- data/conf/samples/cdrsexport_mongo/cgrates.json | 2 +- data/conf/samples/cdrsexport_mysql/cgrates.json | 2 +- ers/kafka_it_test.go | 2 +- general_tests/cdrs_exp_it_test.go | 2 +- general_tests/cdrs_onlexp_it_test.go | 2 +- 7 files changed, 6 insertions(+), 7 deletions(-) diff --git a/console/trigger_remove_test.go b/console/trigger_remove_test.go index eb47c6b86..c95ab69bc 100644 --- a/console/trigger_remove_test.go +++ b/console/trigger_remove_test.go @@ -50,4 +50,3 @@ func TestCmdTriggerRemove(t *testing.T) { t.Fatal(err) } } - diff --git a/data/conf/samples/cdrsexport_internal/cgrates.json b/data/conf/samples/cdrsexport_internal/cgrates.json index a221a4910..1c33a1c3d 100644 --- a/data/conf/samples/cdrsexport_internal/cgrates.json +++ b/data/conf/samples/cdrsexport_internal/cgrates.json @@ -114,7 +114,7 @@ "topic": "cgrates_cdrs", }, "tenant": "cgrates.org", - "attempts": 1, + "attempts": 10, "fields":[ {"tag": "RequiredTemplate","type": "*template", "value": "requiredFields"}, ], diff --git a/data/conf/samples/cdrsexport_mongo/cgrates.json b/data/conf/samples/cdrsexport_mongo/cgrates.json index c3fa85b29..14a65aec4 100644 --- a/data/conf/samples/cdrsexport_mongo/cgrates.json +++ b/data/conf/samples/cdrsexport_mongo/cgrates.json @@ -119,7 +119,7 @@ "topic": "cgrates_cdrs", }, "tenant": "cgrates.org", - "attempts": 1, + "attempts": 10, "fields":[ {"tag": "RequiredTemplate","type": "*template", "value": "requiredFields"}, ], diff --git a/data/conf/samples/cdrsexport_mysql/cgrates.json b/data/conf/samples/cdrsexport_mysql/cgrates.json index 4c2736e19..d1c881792 100644 --- a/data/conf/samples/cdrsexport_mysql/cgrates.json +++ b/data/conf/samples/cdrsexport_mysql/cgrates.json @@ -115,7 +115,7 @@ "topic": "cgrates_cdrs", }, "tenant": "cgrates.org", - "attempts": 1, + "attempts": 10, "fields":[ {"tag": "RequiredTemplate","type": "*template", "value": "requiredFields"}, ], diff --git a/ers/kafka_it_test.go b/ers/kafka_it_test.go index 97603002b..6c710f587 100644 --- a/ers/kafka_it_test.go +++ b/ers/kafka_it_test.go @@ -110,7 +110,7 @@ func TestKafkaER(t *testing.T) { if !reflect.DeepEqual(ev.cgrEvent, expected) { t.Errorf("Expected %s ,received %s", utils.ToJSON(expected), utils.ToJSON(ev.cgrEvent)) } - case <-time.After(10 * time.Second): + case <-time.After(30 * time.Second): t.Fatal("Timeout") } close(rdrExit) diff --git a/general_tests/cdrs_exp_it_test.go b/general_tests/cdrs_exp_it_test.go index 7fafbb97a..9e1ac24dc 100644 --- a/general_tests/cdrs_exp_it_test.go +++ b/general_tests/cdrs_exp_it_test.go @@ -314,7 +314,7 @@ func testCDRsExpKafka(t *testing.T) { defer reader.Close() - ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) var m kafka.Message var err error if m, err = reader.ReadMessage(ctx); err != nil { diff --git a/general_tests/cdrs_onlexp_it_test.go b/general_tests/cdrs_onlexp_it_test.go index 04b83eec7..6a699443a 100644 --- a/general_tests/cdrs_onlexp_it_test.go +++ b/general_tests/cdrs_onlexp_it_test.go @@ -491,7 +491,7 @@ func testCDRsOnExpKafkaPosterFileFailover(t *testing.T) { defer reader.Close() for i := 0; i < 2; i++ { // no raw CDR - ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) if m, err := reader.ReadMessage(ctx); err != nil { t.Fatal(err) } else if !reflect.DeepEqual(failoverContent[0], m.Value) && !reflect.DeepEqual(failoverContent[1], m.Value) { // Checking just the prefix should do since some content is dynamic