<commit_before>package ActiveObject

import (
	"sync"
	"testing"
	"time"

	"github.com/stretchr/testify/assert"
)

func TestActiveObject(t *testing.T) {
	var activeObject IActiveObject

	var wait sync.WaitGroup
	wait.Add(1)

	activeObject = NewActiveObjectWithInterval(time.Millisecond * 50)

	counter := 0
	activeObject.SetWorkerFunction(func(param interface{}) {
		counter++

		if counter > 3 {
			wait.Done()
		}
	})

	activeObject.Run(10)<commit_msg>Make sure the param passed is correct<commit_after>package ActiveObject

import (
	"sync"
	"testing"
	"time"

	"github.com/stretchr/testify/assert"
)

func TestActiveObject(t *testing.T) {
	var activeObject IActiveObject

	var wait sync.WaitGroup
	wait.Add(1)

	activeObject = NewActiveObjectWithInterval(time.Millisecond * 50)

	counter := 0
	activeObject.SetWorkerFunction(func(param interface{}) {
		assert.Equal(t, param, 20, "param is incorrect")

		counter++

		if counter > 3 {
			wait.Done()
		}
	})

	activeObject.Run(10)
{'fraction_non_alphanumeric': 0.11585365853658537, 'fraction_numerical': 0.016260162601626018, 'mean_word_length': 4.564971751412429, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6100430', 'n_tokens_mistral': 370, 'n_tokens_neox': 334, 'n_words': 71}