Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rsafier committed Mar 26, 2024
1 parent 3e78264 commit b27c189
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ jobs:
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal -l "console;verbosity=detailed" --collect:"XPlat Code Coverage" --logger "trx;LogFileName=test-results.trx" --results-directory ./coverage
run: |
cdir=pwd
cd LNUnit.Tests
dotnet test -f net8.0 --filter FullyQualifiedName~LNUnit.Test --no-build --verbosity normal -l "console;verbosity=detailed" --collect:"XPlat Code Coverage" --logger "trx;LogFileName=test-results.trx" --results-directory $cdir/coverage
- name: Test Report
uses: dorny/test-reporter@v1
if: success() || failure() # run this step even if previous step failed
Expand Down
3 changes: 1 addition & 2 deletions LNUnit.Tests/AbcLightningFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using Grpc.Core;
using Lnrpc;
using LNUnit.Extentions;
using LNUnit.Fixtures;
using LNUnit.LND;
using LNUnit.Setup;
using Microsoft.Extensions.Caching.Memory;
Expand All @@ -17,7 +16,7 @@
using ServiceStack.Text;
using Assert = NUnit.Framework.Assert;

namespace LNUnit.Fixtures;
namespace LNUnit.Test.Fixtures;

[TestFixture("postgres")]
[TestFixture("boltdb")]
Expand Down
2 changes: 1 addition & 1 deletion LNUnit.Tests/Fixture/PostgresFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using Assert = NUnit.Framework.Assert;
using HostConfig = Docker.DotNet.Models.HostConfig;

namespace LNUnit.Fixtures;
namespace LNUnit.Test.Fixtures;

/// <summary>
/// Used Globally to get Postgres support
Expand Down
7 changes: 6 additions & 1 deletion LNUnit/Setup/LNUnitBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public async Task Build(bool setupNetwork = false, string lndRoot = "/home/lnd/.
BitcoinRpcClient = new RPCClient("bitcoin:bitcoin",
bitcoinNode.NetworkSettings.Networks.First().Value.IPAddress, Bitcoin.Instance.Regtest);
WaitForBitcoinNodeStartupTimeout = 30000;
BitcoinRpcClient.HttpClient = new HttpClient() { Timeout = WaitForBitcoinNodeStartupTimeout };
BitcoinRpcClient.HttpClient = new HttpClient() { Timeout = TimeSpan.FromMilliseconds(WaitForBitcoinNodeStartupTimeout) };

await BitcoinRpcClient.CreateWalletAsync("default", new CreateWalletOptions { LoadOnStartup = true });
var utxos = await BitcoinRpcClient.GenerateAsync(200);
Expand Down Expand Up @@ -322,6 +322,11 @@ await GetTarStreamFromFS(n.DockerContainerId,
foreach (var remoteNode in remotes) await ConnectPeers(localNode, remoteNode);
}

while (LNDNodePool.ReadyNodes.Count < Configuration.LNDNodes.Count)
{
await Task.Delay(250);
if (cancelSource.IsCancellationRequested) throw new Exception("CANCELED");
}
//Setup Channels (this includes sending funds and waiting)
foreach (var n in Configuration.LNDNodes) //TODO: can do multiple at once
{
Expand Down

0 comments on commit b27c189

Please sign in to comment.