Skip to content

Commit

Permalink
adapt unit test
Browse files Browse the repository at this point in the history
Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
  • Loading branch information
odubajDT committed Mar 27, 2024
1 parent 0dfb617 commit 6ec9d34
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ func TestProvidersPool(t *testing.T) {

func TestProvidersPool_StartProviders(t *testing.T) {

numJobs := 4
numJobs := 6
ctx, cancel := context.WithCancel(context.Background())
resChan := make(chan metricsapi.ProviderResult)
// Create a mock IObjectivesEvaluator, Client, and Logger for testing
Expand All @@ -273,7 +273,7 @@ func TestProvidersPool_StartProviders(t *testing.T) {
time.Sleep(time.Millisecond * 100)

// Assert the expected number of workers (goroutines) were started
require.Equal(t, 4, len(pool.providers))
require.Equal(t, 6, len(pool.providers))
require.Equal(t, numJobs, cap(pool.providers["prometheus"]))
// Stop the providers after testing
pool.StopProviders()
Expand Down

0 comments on commit 6ec9d34

Please sign in to comment.