@@ -21,7 +21,7 @@ import (
2121func TestWorkerBatchLoop (t * testing.T ) {
2222t .Run ("no batching and no transform at router, acceptWorkerJob returning always nil" ,func (t * testing.T ) {
2323// Setup
24- inputCh := make (chan workerJob ,10 )
24+ inputCh := make (chan * workerJob ,10 )
2525batchSize := 5
2626
2727var processedJobs []types.DestinationJobT
@@ -75,7 +75,7 @@ func TestWorkerBatchLoop(t *testing.T) {
7575params := & routerutils.JobParameters {
7676TransformAt :"processor" ,// Not "router"
7777}
78- inputCh <- workerJob {job :job ,parameters :params }
78+ inputCh <- & workerJob {job :job ,parameters :params }
7979}
8080
8181// Wait a bit to ensure jobs are processed and some timeouts are triggered too
@@ -104,7 +104,7 @@ func TestWorkerBatchLoop(t *testing.T) {
104104
105105t .Run ("no batching and transform at router, then switch to no router transform" ,func (t * testing.T ) {
106106// Setup
107- inputCh := make (chan workerJob ,10 )
107+ inputCh := make (chan * workerJob ,10 )
108108batchSize := 5
109109
110110var processedJobs []types.DestinationJobT
@@ -184,7 +184,7 @@ func TestWorkerBatchLoop(t *testing.T) {
184184params := & routerutils.JobParameters {
185185TransformAt :"router" ,
186186}
187- inputCh <- workerJob {job :job ,parameters :params }
187+ inputCh <- & workerJob {job :job ,parameters :params }
188188}
189189
190190// Send a job with transform_at != "router" - this should trigger batch processing
@@ -195,7 +195,7 @@ func TestWorkerBatchLoop(t *testing.T) {
195195params := & routerutils.JobParameters {
196196TransformAt :"processor" ,// Not "router"
197197}
198- inputCh <- workerJob {job :job ,parameters :params }
198+ inputCh <- & workerJob {job :job ,parameters :params }
199199
200200// Wait a bit to ensure processing
201201time .Sleep (200 * time .Millisecond )
@@ -226,7 +226,7 @@ func TestWorkerBatchLoop(t *testing.T) {
226226
227227t .Run ("with batching enabled" ,func (t * testing.T ) {
228228// Setup
229- inputCh := make (chan workerJob ,10 )
229+ inputCh := make (chan * workerJob ,10 )
230230batchSize := 3
231231
232232var processedJobs []types.DestinationJobT
@@ -292,7 +292,7 @@ func TestWorkerBatchLoop(t *testing.T) {
292292params := & routerutils.JobParameters {
293293TransformAt :"router" ,
294294}
295- inputCh <- workerJob {job :job ,parameters :params }
295+ inputCh <- & workerJob {job :job ,parameters :params }
296296}
297297
298298// Wait for batch processing
@@ -306,7 +306,7 @@ func TestWorkerBatchLoop(t *testing.T) {
306306params := & routerutils.JobParameters {
307307TransformAt :"router" ,
308308}
309- inputCh <- workerJob {job :job ,parameters :params }
309+ inputCh <- & workerJob {job :job ,parameters :params }
310310
311311// Wait for timeout to trigger processing of remaining jobs
312312time .Sleep (200 * time .Millisecond + 50 * time .Millisecond )
@@ -338,7 +338,7 @@ func TestWorkerBatchLoop(t *testing.T) {
338338
339339t .Run ("jobsBatchTimeout resets even when no jobs during timeout" ,func (t * testing.T ) {
340340// Setup
341- inputCh := make (chan workerJob ,10 )
341+ inputCh := make (chan * workerJob ,10 )
342342batchSize := 5
343343
344344var timeoutFireCount int
@@ -400,7 +400,7 @@ func TestWorkerBatchLoop(t *testing.T) {
400400params := & routerutils.JobParameters {
401401TransformAt :"router" ,
402402}
403- inputCh <- workerJob {job :job ,parameters :params }
403+ inputCh <- & workerJob {job :job ,parameters :params }
404404
405405// Wait longer than timeout to ensure timeout fires
406406time .Sleep (60 * time .Millisecond )
@@ -433,7 +433,7 @@ func TestWorkerBatchLoop(t *testing.T) {
433433
434434t .Run ("batch processing when batch size is reached" ,func (t * testing.T ) {
435435// Setup
436- inputCh := make (chan workerJob ,10 )
436+ inputCh := make (chan * workerJob ,10 )
437437batchSize := 2 // Small batch size for testing
438438
439439var processedBatches [][]types.DestinationJobT
@@ -493,7 +493,7 @@ func TestWorkerBatchLoop(t *testing.T) {
493493params := & routerutils.JobParameters {
494494TransformAt :"router" ,
495495}
496- inputCh <- workerJob {job :job ,parameters :params }
496+ inputCh <- & workerJob {job :job ,parameters :params }
497497}
498498
499499// Wait for processing
@@ -508,7 +508,7 @@ func TestWorkerBatchLoop(t *testing.T) {
508508params := & routerutils.JobParameters {
509509TransformAt :"router" ,
510510}
511- inputCh <- workerJob {job :job ,parameters :params }
511+ inputCh <- & workerJob {job :job ,parameters :params }
512512}
513513
514514// Wait for processing