Skip to content

Commit 8020f64

Browse files
committed
refactor: update WithDroppedNotification to use getter/setter for OnDroppedNotification
1 parent b1cc37a commit 8020f64

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

subscriber_test_helper.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ func WithDroppedNotification(t *testing.T, handler func(ctx context.Context, not
3535
t.Helper()
3636

3737
droppedNotificationMu.Lock()
38-
prev := OnDroppedNotification
39-
OnDroppedNotification = handler
38+
prev := GetOnDroppedNotification()
39+
SetOnDroppedNotification(handler)
4040

4141
// Ensure restore and unlock even if fn panics.
4242
defer func() {
43-
OnDroppedNotification = prev
43+
SetOnDroppedNotification(prev)
4444
droppedNotificationMu.Unlock()
4545
}()
4646

0 commit comments

Comments
 (0)