mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 22:44:29 +01:00
For lightning payments tests, add small delay after creating the invoice before sending the payment
This commit is contained in:
@@ -481,10 +481,6 @@ namespace BTCPayServer.Tests
|
|||||||
|
|
||||||
async Task CanSendLightningPaymentCore(ServerTester tester, TestAccount user)
|
async Task CanSendLightningPaymentCore(ServerTester tester, TestAccount user)
|
||||||
{
|
{
|
||||||
// TODO: If this parameter is less than 1 second we start having concurrency problems
|
|
||||||
await Task.Delay(TimeSpan.FromMilliseconds(1000));
|
|
||||||
//
|
|
||||||
|
|
||||||
var invoice = await user.BitPay.CreateInvoiceAsync(new Invoice()
|
var invoice = await user.BitPay.CreateInvoiceAsync(new Invoice()
|
||||||
{
|
{
|
||||||
Price = 0.01m,
|
Price = 0.01m,
|
||||||
@@ -493,6 +489,7 @@ namespace BTCPayServer.Tests
|
|||||||
OrderId = "orderId",
|
OrderId = "orderId",
|
||||||
ItemDesc = "Some description"
|
ItemDesc = "Some description"
|
||||||
});
|
});
|
||||||
|
await Task.Delay(TimeSpan.FromMilliseconds(1000)); // Give time to listen the new invoices
|
||||||
await tester.SendLightningPaymentAsync(invoice);
|
await tester.SendLightningPaymentAsync(invoice);
|
||||||
await EventuallyAsync(async () =>
|
await EventuallyAsync(async () =>
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user