Skip to content

Commit 8a4dd50

Browse files
committed
test: use testing logger
1 parent b59a888 commit 8a4dd50

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

internal/beatcmd/locker_test.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,12 @@ func TestLocker(t *testing.T) {
4646

4747
// Create another Beat using the same configuration and data directory;
4848
// its Run method should fail to acquire the lock while beat1 is running.
49-
beat2, err := NewBeat(BeatParams{
50-
NewRunner: func(RunnerParams) (Runner, error) {
49+
beat2 := newBeat(t, "", func(rp RunnerParams) (Runner, error) {
50+
return runnerFunc(func(ctx context.Context) error {
5151
panic("should not be called")
52-
},
52+
}), nil
5353
})
54-
require.NoError(t, err)
55-
err = beat2.Run(context.Background())
54+
err := beat2.Run(context.Background())
5655
require.ErrorIs(t, err, ErrAlreadyLocked)
5756

5857
assert.NoError(t, stopBeat1())

0 commit comments

Comments
 (0)