mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-01-19 05:33:31 +01:00
Make CanUseWebhooks less flaky
This commit is contained in:
parent
7503fde48c
commit
2327b97fa3
@ -804,8 +804,13 @@ namespace BTCPayServer.Tests
|
|||||||
});
|
});
|
||||||
Assert.Null(hook.Secret);
|
Assert.Null(hook.Secret);
|
||||||
AssertHook(fakeServer, hook);
|
AssertHook(fakeServer, hook);
|
||||||
var deliveries = await clientProfile.GetWebhookDeliveries(user.StoreId, hook.Id);
|
WebhookDeliveryData delivery = null;
|
||||||
var delivery = Assert.Single(deliveries);
|
await TestUtils.EventuallyAsync(async () =>
|
||||||
|
{
|
||||||
|
var deliveries = await clientProfile.GetWebhookDeliveries(user.StoreId, hook.Id);
|
||||||
|
delivery = Assert.Single(deliveries);
|
||||||
|
});
|
||||||
|
|
||||||
delivery = await clientProfile.GetWebhookDelivery(user.StoreId, hook.Id, delivery.Id);
|
delivery = await clientProfile.GetWebhookDelivery(user.StoreId, hook.Id, delivery.Id);
|
||||||
Assert.NotNull(delivery);
|
Assert.NotNull(delivery);
|
||||||
Assert.Equal(WebhookDeliveryStatus.HttpSuccess, delivery.Status);
|
Assert.Equal(WebhookDeliveryStatus.HttpSuccess, delivery.Status);
|
||||||
|
Loading…
Reference in New Issue
Block a user