From dbe1579fc4a003220611529f706afaa5397dd3bd Mon Sep 17 00:00:00 2001 From: Kukks Date: Thu, 24 Sep 2020 09:43:39 +0200 Subject: [PATCH] fix pos app test --- BTCPayServer.Tests/AltcoinTests/AltcoinTests.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/BTCPayServer.Tests/AltcoinTests/AltcoinTests.cs b/BTCPayServer.Tests/AltcoinTests/AltcoinTests.cs index 3f361a90f..c4b62e609 100644 --- a/BTCPayServer.Tests/AltcoinTests/AltcoinTests.cs +++ b/BTCPayServer.Tests/AltcoinTests/AltcoinTests.cs @@ -788,8 +788,13 @@ noninventoryitem: Assert.IsType(apps.UpdatePointOfSale(appId, vmpos).Result); //inventoryitem has 1 item available - Assert.IsType(publicApps - .ViewPointOfSale(appId, PosViewType.Cart, 1, null, null, null, null, "inventoryitem").Result); + await tester.WaitForEvent(() => + { + Assert.IsType(publicApps + .ViewPointOfSale(appId, PosViewType.Cart, 1, null, null, null, null, "inventoryitem").Result); + return Task.CompletedTask; + }); + //we already bought all available stock so this should fail await Task.Delay(100); Assert.IsType(publicApps