diff options
author | Gabriel Arakaki Giovanini <mail@gabrielgio.me> | 2023-10-24 19:12:52 +0200 |
---|---|---|
committer | Gabriel Arakaki Giovanini <mail@gabrielgio.me> | 2023-10-24 19:12:52 +0200 |
commit | c3ea735c0f03a0827a8e753a5b5adf6e31f4c925 (patch) | |
tree | ab2d15625f720858c570e66c00279ccc6cb28ec3 /pkg/worker/list_processor_test.go | |
parent | a9a270ba1e1e9add10d75de3e592efee9728c5b4 (diff) | |
download | lens-c3ea735c0f03a0827a8e753a5b5adf6e31f4c925.tar.gz lens-c3ea735c0f03a0827a8e753a5b5adf6e31f4c925.tar.bz2 lens-c3ea735c0f03a0827a8e753a5b5adf6e31f4c925.zip |
feat: Migrate from logrus to slog
Diffstat (limited to 'pkg/worker/list_processor_test.go')
-rw-r--r-- | pkg/worker/list_processor_test.go | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/pkg/worker/list_processor_test.go b/pkg/worker/list_processor_test.go index abdb907..21489e8 100644 --- a/pkg/worker/list_processor_test.go +++ b/pkg/worker/list_processor_test.go @@ -5,12 +5,11 @@ package worker import ( "context" "errors" + "log/slog" "math/rand" "sync" "testing" - "github.com/sirupsen/logrus" - "git.sr.ht/~gabrielgio/img/pkg/testkit" ) @@ -27,12 +26,12 @@ type ( func TestListProcessorLimit(t *testing.T) { var ( - log = logrus.New() + log = slog.Default() scheduler = NewScheduler(1) mock = &mockCounterListProcessor{countTo: 10000} ) - worker := NewTaskFromBatchProcessor[int](mock, scheduler, log.WithField("context", "testing")) + worker := NewTaskFromBatchProcessor[int](mock, scheduler, log.With("context", "testing")) err := worker.Start(context.Background()) testkit.TestFatalError(t, "Start", err) @@ -42,12 +41,12 @@ func TestListProcessorLimit(t *testing.T) { func TestListProcessorContextCancelQuery(t *testing.T) { var ( - log = logrus.New() + log = slog.Default() scheduler = NewScheduler(1) mock = &mockContextListProcessor{} ) - worker := NewTaskFromBatchProcessor[int](mock, scheduler, log.WithField("context", "testing")) + worker := NewTaskFromBatchProcessor[int](mock, scheduler, log.With("context", "testing")) ctx, cancel := context.WithCancel(context.Background()) var wg sync.WaitGroup |