Attempt to fix flaky tests

This commit is contained in:
Kukks
2020-12-08 10:02:03 +01:00
parent 920caaa524
commit 716952cd58
2 changed files with 2 additions and 2 deletions

View File

@@ -788,7 +788,7 @@ noninventoryitem:
Assert.IsType<RedirectToActionResult>(apps.UpdatePointOfSale(appId, vmpos).Result);
//inventoryitem has 1 item available
await tester.WaitForEvent<InvoiceEvent>(() =>
await tester.WaitForEvent<AppInventoryUpdaterHostedService.UpdateAppInventory>(() =>
{
Assert.IsType<RedirectToActionResult>(publicApps
.ViewPointOfSale(appId, PosViewType.Cart, 1, null, null, null, null, "inventoryitem").Result);

View File

@@ -819,7 +819,7 @@ namespace BTCPayServer.Tests
{
await tester.ExplorerNode.SendToAddressAsync(
BitcoinAddress.Create(invoice.BitcoinAddress, Network.RegTest), Money.Coins(0.00005m));
});
}, e => e.InvoiceId == invoice.Id && e.PaymentMethodId.PaymentType == LightningPaymentType.Instance );
await tester.ExplorerNode.GenerateAsync(1);
await Task.Delay(100); // wait a bit for payment to process before fetching new invoice
var newInvoice = await user.BitPay.GetInvoiceAsync(invoice.Id);