Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

Commit

Permalink
Fix unit test.
Browse files Browse the repository at this point in the history
  • Loading branch information
Baliedge committed Sep 29, 2023
1 parent 66e8943 commit 3bad7e8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 2 additions & 0 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ func (c *Config) SetDefaults() error {
setter.SetDefault(&c.LocalPicker, NewReplicatedConsistentHash(nil, defaultReplicas))
setter.SetDefault(&c.RegionPicker, NewRegionPicker(nil))

setter.SetDefault(&c.CacheSize, 50_000)
setter.SetDefault(&c.Workers, runtime.NumCPU())
setter.SetDefault(&c.Logger, logrus.New().WithField("category", "gubernator"))

if c.CacheFactory == nil {
c.CacheFactory = func(maxSize int) Cache {
Expand Down
3 changes: 0 additions & 3 deletions gubernator.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,9 @@ import (

"github.com/mailgun/errors"
"github.com/mailgun/holster/v4/ctxutil"
"github.com/mailgun/holster/v4/setter"
"github.com/mailgun/holster/v4/syncutil"
"github.com/mailgun/holster/v4/tracing"
"github.com/prometheus/client_golang/prometheus"
"github.com/sirupsen/logrus"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/propagation"
"go.opentelemetry.io/otel/trace"
Expand Down Expand Up @@ -116,7 +114,6 @@ func NewV1Instance(conf Config) (s *V1Instance, err error) {
return nil, err
}

setter.SetDefault(&conf.Logger, logrus.WithField("category", "gubernator"))
s = &V1Instance{
log: conf.Logger,
conf: conf,
Expand Down
1 change: 0 additions & 1 deletion workers_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ func TestWorkersInternal(t *testing.T) {
const concurrency = 32
conf := &Config{
Workers: concurrency,
CacheSize: 1000,
}
require.NoError(t, conf.SetDefaults())

Expand Down

0 comments on commit 3bad7e8

Please sign in to comment.