mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-03-10 17:26:05 +01:00
Fix flakyness in CanUseLightningAPI test
This commit is contained in:
parent
fe8360e870
commit
d40669c7bd
1 changed files with 2 additions and 4 deletions
|
@ -3017,13 +3017,11 @@ namespace BTCPayServer.Tests
|
|||
Assert.NotEqual(0, info.BlockHeight);
|
||||
|
||||
// balance
|
||||
var balance = await client.GetLightningNodeBalance(user.StoreId, "BTC");
|
||||
Assert.True(LightMoney.Satoshis(1000) <= balance.OffchainBalance.Local);
|
||||
|
||||
await TestUtils.EventuallyAsync(async () =>
|
||||
{
|
||||
var localBalance = balance.OffchainBalance.Local.ToDecimal(LightMoneyUnit.BTC);
|
||||
var balance = await client.GetLightningNodeBalance(user.StoreId, "BTC");
|
||||
var histogram = await client.GetLightningNodeHistogram(user.StoreId, "BTC");
|
||||
var localBalance = balance.OffchainBalance.Local.ToDecimal(LightMoneyUnit.BTC);
|
||||
Assert.Equal(histogram.Balance, histogram.Series.Last());
|
||||
Assert.Equal(localBalance, histogram.Balance);
|
||||
Assert.Equal(localBalance, histogram.Series.Last());
|
||||
|
|
Loading…
Add table
Reference in a new issue