From 21e69251e3b58f19ccb2ee52f3fd6bf314ecf8da Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Mon, 17 Jan 2022 16:59:37 +0900 Subject: [PATCH] CanSendIPN can't ensure received payment is sent first --- BTCPayServer.Tests/UnitTest1.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/BTCPayServer.Tests/UnitTest1.cs b/BTCPayServer.Tests/UnitTest1.cs index adc490c22..06cc3c311 100644 --- a/BTCPayServer.Tests/UnitTest1.cs +++ b/BTCPayServer.Tests/UnitTest1.cs @@ -569,7 +569,7 @@ namespace BTCPayServer.Tests bool paid = false; bool confirmed = false; bool completed = false; - while (!completed || !confirmed) + while (!completed || !confirmed || !receivedPayment) { var request = await callbackServer.GetNextRequest(); if (request.ContainsKey("event")) @@ -584,7 +584,9 @@ namespace BTCPayServer.Tests receivedPayment = true; break; case InvoiceEvent.PaidInFull: - Assert.True(receivedPayment); + // TODO, we should check that ReceivedPayment is sent after PaidInFull + // for now, we can't ensure this because the ReceivedPayment events isn't sent by the + // InvoiceWatcher, contrary to all other events tester.ExplorerNode.Generate(6); paid = true; break;