Wait for the nodes to be fully synched before starting tests

This commit is contained in:
nicolas.dorier
2018-10-31 13:06:17 +09:00
parent 93cefced80
commit 4db5b4f2b1

View File

@@ -1,4 +1,5 @@
using BTCPayServer.Configuration; using BTCPayServer.Configuration;
using System.Linq;
using BTCPayServer.HostedServices; using BTCPayServer.HostedServices;
using BTCPayServer.Hosting; using BTCPayServer.Hosting;
using BTCPayServer.Payments; using BTCPayServer.Payments;
@@ -139,6 +140,11 @@ namespace BTCPayServer.Tests
_Host.Start(); _Host.Start();
InvoiceRepository = (InvoiceRepository)_Host.Services.GetService(typeof(InvoiceRepository)); InvoiceRepository = (InvoiceRepository)_Host.Services.GetService(typeof(InvoiceRepository));
StoreRepository = (StoreRepository)_Host.Services.GetService(typeof(StoreRepository)); StoreRepository = (StoreRepository)_Host.Services.GetService(typeof(StoreRepository));
var dashBoard = (NBXplorerDashboard)_Host.Services.GetService(typeof(NBXplorerDashboard));
while(!dashBoard.IsFullySynched())
{
Thread.Sleep(10);
}
if (MockRates) if (MockRates)
{ {