Skip to content

Commit

Permalink
fixing unit test for config initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
rajesh-1983 committed Aug 1, 2024
1 parent b7fe5d3 commit c962e24
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/workerpool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package lib

import (
"encoding/hex"
otelconfig "github.com/paypal/hera/utility/logger/otel/config"
"os"
"sync"
"testing"
Expand All @@ -28,15 +29,18 @@ import (
func TestPoolDempotency(t *testing.T) {
var useheratxt = false
var err error
poolName := "hera-test"
if useheratxt {
err = InitConfig()
err = InitConfig(poolName)
if err != nil {
t.Errorf("config initialization failure %s", err.Error())
return
}
} else {
gAppConfig = &Config{BacklogTimeoutMsec: 1, LifoScheduler: true, numWorkersCh: make(chan int, 1)}
gOpsConfig = &OpsConfig{numWorkers: 3}
otelconfig.OTelConfigData = &otelconfig.OTelConfig{}
otelconfig.OTelConfigData.Enabled = false
gAppConfig.numWorkersCh <- int(gOpsConfig.numWorkers)
}
os.Remove("state.log")
Expand Down

0 comments on commit c962e24

Please sign in to comment.