We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 375cf47 commit ca6200fCopy full SHA for ca6200f
notifications/manager_test.go
@@ -140,9 +140,11 @@ func TestManager_ReservationNotification(t *testing.T) {
140
return len(mgr.subscribers[NotificationTypeReservation]) > 0
141
}, time.Second*5, 10*time.Millisecond)
142
143
- mockClient.Lock()
144
- require.Equal(t, 1, mockClient.timesCalled)
145
- mockClient.Unlock()
+ require.Eventually(t, func() bool {
+ mockClient.Lock()
+ defer mockClient.Unlock()
146
+ return mockClient.timesCalled == 1
147
+ }, time.Second*5, 10*time.Millisecond)
148
149
// Send a test notification
150
testNotif := getTestNotification(testReservationId)
0 commit comments