From 716952cd581ff5e28bdd7db6ba326aa398c548c3 Mon Sep 17 00:00:00 2001 From: Kukks Date: Tue, 8 Dec 2020 10:02:03 +0100 Subject: [PATCH] Attempt to fix flaky tests --- BTCPayServer.Tests/AltcoinTests/AltcoinTests.cs | 2 +- BTCPayServer.Tests/UnitTest1.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/BTCPayServer.Tests/AltcoinTests/AltcoinTests.cs b/BTCPayServer.Tests/AltcoinTests/AltcoinTests.cs index b892c025a..47bd59e5c 100644 --- a/BTCPayServer.Tests/AltcoinTests/AltcoinTests.cs +++ b/BTCPayServer.Tests/AltcoinTests/AltcoinTests.cs @@ -788,7 +788,7 @@ noninventoryitem: Assert.IsType(apps.UpdatePointOfSale(appId, vmpos).Result); //inventoryitem has 1 item available - await tester.WaitForEvent(() => + await tester.WaitForEvent(() => { Assert.IsType(publicApps .ViewPointOfSale(appId, PosViewType.Cart, 1, null, null, null, null, "inventoryitem").Result); diff --git a/BTCPayServer.Tests/UnitTest1.cs b/BTCPayServer.Tests/UnitTest1.cs index 53cf2bbf2..f8e12edc2 100644 --- a/BTCPayServer.Tests/UnitTest1.cs +++ b/BTCPayServer.Tests/UnitTest1.cs @@ -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);