mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-01-18 13:26:47 +01:00
Run unreliable tests, attempt to make them a bit more reliable
This commit is contained in:
parent
6aa84326af
commit
4625ff92f1
@ -21,6 +21,7 @@ jobs:
|
||||
dotnet test --filter Fast=Fast
|
||||
docker-compose up -d dev
|
||||
dotnet test --filter Reliable=Reliable
|
||||
dotnet test --filter Unreliable=Unreliable
|
||||
workflows:
|
||||
version: 2
|
||||
build_and_test:
|
||||
|
@ -1,4 +1,5 @@
|
||||
using BTCPayServer.Configuration;
|
||||
using BTCPayServer.HostedServices;
|
||||
using BTCPayServer.Hosting;
|
||||
using BTCPayServer.Payments;
|
||||
using BTCPayServer.Payments.Lightning;
|
||||
@ -255,5 +256,18 @@ namespace BTCPayServer.Tests
|
||||
if (_Host != null)
|
||||
_Host.Dispose();
|
||||
}
|
||||
|
||||
public void WaitFullNodeAvailable(string cryptoCode)
|
||||
{
|
||||
using (var cts = new CancellationTokenSource(5000))
|
||||
{
|
||||
var dashboard = GetService<NBXplorerDashboard>();
|
||||
while (!dashboard.IsFullySynched(cryptoCode, out var unused))
|
||||
{
|
||||
Thread.Sleep(10);
|
||||
cts.Token.ThrowIfCancellationRequested();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -410,6 +410,7 @@ namespace BTCPayServer.Tests
|
||||
Assert.IsType<ViewResult>(storeController.UpdateStore());
|
||||
Assert.IsType<ViewResult>(storeController.AddLightningNode(user.StoreId, "BTC"));
|
||||
|
||||
tester.PayTester.WaitFullNodeAvailable("BTC");
|
||||
var testResult = storeController.AddLightningNode(user.StoreId, new LightningNodeViewModel()
|
||||
{
|
||||
ConnectionString = "type=charge;server=" + tester.MerchantCharge.Client.Uri.AbsoluteUri,
|
||||
|
Loading…
Reference in New Issue
Block a user