mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
notifications: fix test race
This commit is contained in:
parent
b74dab8af4
commit
d2d8e71ea0
1 changed files with 5 additions and 3 deletions
|
|
@ -142,9 +142,11 @@ func TestManager_ReservationNotification(t *testing.T) {
|
|||
return mockClient.timesCalled > 0
|
||||
}, time.Second*5, 10*time.Millisecond)
|
||||
|
||||
mockClient.Lock()
|
||||
require.Equal(t, 1, mockClient.timesCalled)
|
||||
mockClient.Unlock()
|
||||
require.Eventually(t, func() bool {
|
||||
mockClient.Lock()
|
||||
defer mockClient.Unlock()
|
||||
return mockClient.timesCalled == 1
|
||||
}, time.Second*5, 10*time.Millisecond)
|
||||
|
||||
// Send a test notification
|
||||
testNotif := getTestNotification(testReservationId)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue