diff --git a/ers/filecsv_it_test.go b/ers/filecsv_it_test.go index c6e55e6f6..22cd683c6 100644 --- a/ers/filecsv_it_test.go +++ b/ers/filecsv_it_test.go @@ -668,9 +668,7 @@ func TestFileCSV(t *testing.T) { rdrEvents: make(chan *erEvent, 1), rdrError: make(chan error, 1), rdrExit: make(chan struct{}), - conReqs: make(chan struct{}, 1), } - eR.conReqs <- struct{}{} eR.Config().RunDelay = 1 * time.Millisecond if err := eR.Serve(); err != nil { t.Error(err) @@ -688,10 +686,8 @@ func TestFileCSVServeDefault(t *testing.T) { rdrEvents: make(chan *erEvent, 1), rdrError: make(chan error, 1), rdrExit: make(chan struct{}), - conReqs: make(chan struct{}, 1), } var err error - eR.conReqs <- struct{}{} filePath := "/tmp/ers/out/" err = os.MkdirAll(filePath, 0777) if err != nil { @@ -725,9 +721,7 @@ func TestFileCSVExit(t *testing.T) { rdrEvents: make(chan *erEvent, 1), rdrError: make(chan error, 1), rdrExit: make(chan struct{}), - conReqs: make(chan struct{}, 1), } - eR.conReqs <- struct{}{} eR.Config().RunDelay = 1 * time.Millisecond if err := eR.Serve(); err != nil { t.Error(err) diff --git a/ers/filefwv_it_test.go b/ers/filefwv_it_test.go index b2ccc4c9c..02ca2f78f 100644 --- a/ers/filefwv_it_test.go +++ b/ers/filefwv_it_test.go @@ -366,9 +366,7 @@ func TestFileFWV(t *testing.T) { rdrEvents: make(chan *erEvent, 1), rdrError: make(chan error, 1), rdrExit: make(chan struct{}), - conReqs: make(chan struct{}, 1), } - eR.conReqs <- struct{}{} filePath := "/tmp/fwvErs/out" err := os.MkdirAll(filePath, 0777) if err != nil { @@ -401,9 +399,7 @@ func TestFileFWVServeDefault(t *testing.T) { rdrEvents: make(chan *erEvent, 1), rdrError: make(chan error, 1), rdrExit: make(chan struct{}), - conReqs: make(chan struct{}, 1), } - eR.conReqs <- struct{}{} filePath := "/tmp/fwvErs/out" err := os.MkdirAll(filePath, 0777) if err != nil { @@ -437,9 +433,7 @@ func TestFileFWVExit(t *testing.T) { rdrEvents: make(chan *erEvent, 1), rdrError: make(chan error, 1), rdrExit: make(chan struct{}), - conReqs: make(chan struct{}, 1), } - eR.conReqs <- struct{}{} eR.Config().RunDelay = 1 * time.Millisecond if err := eR.Serve(); err != nil { t.Error(err) @@ -461,7 +455,6 @@ func TestFileFWVProcessTrailer(t *testing.T) { rdrEvents: make(chan *erEvent, 1), rdrError: make(chan error, 1), rdrExit: make(chan struct{}), - conReqs: make(chan struct{}, 1), } expEvent := &utils.CGREvent{ Tenant: "cgrates.org", @@ -470,7 +463,6 @@ func TestFileFWVProcessTrailer(t *testing.T) { }, APIOpts: map[string]any{}, } - eR.conReqs <- struct{}{} filePath := "/tmp/TestFileFWVProcessTrailer/" if err := os.MkdirAll(filePath, 0777); err != nil { t.Error(err) @@ -521,9 +513,7 @@ func TestFileFWVProcessTrailerError1(t *testing.T) { rdrEvents: make(chan *erEvent, 1), rdrError: make(chan error, 1), rdrExit: make(chan struct{}), - conReqs: make(chan struct{}, 1), } - eR.conReqs <- struct{}{} filePath := "/tmp/TestFileFWVProcessTrailer/" if err := os.MkdirAll(filePath, 0777); err != nil { t.Error(err) @@ -557,9 +547,7 @@ func TestFileFWVProcessTrailerError2(t *testing.T) { rdrEvents: make(chan *erEvent, 1), rdrError: make(chan error, 1), rdrExit: make(chan struct{}), - conReqs: make(chan struct{}, 1), } - eR.conReqs <- struct{}{} eR.Config().Tenant = config.RSRParsers{ { Rules: "cgrates.org", @@ -604,9 +592,7 @@ func TestFileFWVProcessTrailerError3(t *testing.T) { rdrEvents: make(chan *erEvent, 1), rdrError: make(chan error, 1), rdrExit: make(chan struct{}), - conReqs: make(chan struct{}, 1), } - eR.conReqs <- struct{}{} trailerFields := []*config.FCTemplate{ { Tag: "OriginId", @@ -635,9 +621,7 @@ func TestFileFWVCreateHeaderMap(t *testing.T) { rdrEvents: make(chan *erEvent, 1), rdrError: make(chan error, 1), rdrExit: make(chan struct{}), - conReqs: make(chan struct{}, 1), } - eR.conReqs <- struct{}{} expEvent := &utils.CGREvent{ Tenant: "cgrates.org", Event: map[string]any{ @@ -684,9 +668,7 @@ func TestFileFWVCreateHeaderMapError1(t *testing.T) { rdrEvents: make(chan *erEvent, 1), rdrError: make(chan error, 1), rdrExit: make(chan struct{}), - conReqs: make(chan struct{}, 1), } - eR.conReqs <- struct{}{} trailerFields := []*config.FCTemplate{ {}, } @@ -710,9 +692,7 @@ func TestFileFWVCreateHeaderMapError2(t *testing.T) { rdrEvents: make(chan *erEvent, 1), rdrError: make(chan error, 1), rdrExit: make(chan struct{}), - conReqs: make(chan struct{}, 1), } - eR.conReqs <- struct{}{} record := "testRecord" trailerFields := []*config.FCTemplate{ { diff --git a/ers/filejson_it_test.go b/ers/filejson_it_test.go index c9b517bca..38ab58b58 100644 --- a/ers/filejson_it_test.go +++ b/ers/filejson_it_test.go @@ -541,9 +541,7 @@ func TestFileJSON(t *testing.T) { rdrEvents: make(chan *erEvent, 1), rdrError: make(chan error, 1), rdrExit: make(chan struct{}), - conReqs: make(chan struct{}, 1), } - eR.conReqs <- struct{}{} if err := eR.Serve(); err != nil { t.Error(err) } @@ -560,9 +558,7 @@ func TestFileJSONServeDefault(t *testing.T) { rdrEvents: make(chan *erEvent, 1), rdrError: make(chan error, 1), rdrExit: make(chan struct{}), - conReqs: make(chan struct{}, 1), } - eR.conReqs <- struct{}{} filePath := "/tmp/ErsJSON/out/" err := os.MkdirAll(filePath, 0777) if err != nil { @@ -596,9 +592,7 @@ func TestFileJSONExit(t *testing.T) { rdrEvents: make(chan *erEvent, 1), rdrError: make(chan error, 1), rdrExit: make(chan struct{}), - conReqs: make(chan struct{}, 1), } - eR.conReqs <- struct{}{} eR.Config().RunDelay = 1 * time.Millisecond if err := eR.Serve(); err != nil { t.Error(err) diff --git a/ers/filexml_it_test.go b/ers/filexml_it_test.go index 108142e6f..a7ecddef1 100644 --- a/ers/filexml_it_test.go +++ b/ers/filexml_it_test.go @@ -580,9 +580,7 @@ func TestFileXML(t *testing.T) { rdrEvents: make(chan *erEvent, 1), rdrError: make(chan error, 1), rdrExit: make(chan struct{}), - conReqs: make(chan struct{}, 1), } - eR.conReqs <- struct{}{} err := os.MkdirAll(eR.sourceDir, 0777) if err != nil { t.Error(err) @@ -633,9 +631,7 @@ func TestFileXMLError(t *testing.T) { rdrEvents: make(chan *erEvent, 1), rdrError: make(chan error, 1), rdrExit: make(chan struct{}), - conReqs: make(chan struct{}, 1), } - eR.conReqs <- struct{}{} err := os.MkdirAll(eR.sourceDir, 0777) if err != nil { t.Error(err) @@ -676,9 +672,7 @@ func TestFileXMLExit(t *testing.T) { rdrEvents: make(chan *erEvent, 1), rdrError: make(chan error, 1), rdrExit: make(chan struct{}), - conReqs: make(chan struct{}, 1), } - eR.conReqs <- struct{}{} eR.Config().RunDelay = 1 * time.Millisecond if err := eR.Serve(); err != nil { t.Error(err)