Skip to content

Commit 9096e32

Browse files
committed
set logging for code coverage
1 parent 2df92f5 commit 9096e32

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

internal/internal_poller_autoscaler.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,10 @@ func newPollerScaler(
8383
options pollerAutoScalerOptions,
8484
logger *zap.Logger,
8585
hooks ...func()) *pollerAutoScaler {
86-
ctx, cancel := context.WithCancel(context.Background())
8786
if !options.Enabled {
8887
return nil
8988
}
90-
89+
ctx, cancel := context.WithCancel(context.Background())
9190
return &pollerAutoScaler{
9291
isDryRun: options.DryRun,
9392
cooldownTime: options.Cooldown,

internal/worker_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ import (
2626
"github.com/stretchr/testify/assert"
2727
)
2828

29+
func TestMain(m *testing.M) {
30+
EnableVerboseLogging(true)
31+
m.Run()
32+
}
33+
2934
func Test_NewWorker(t *testing.T) {
3035
tests := []struct {
3136
name string

0 commit comments

Comments
 (0)