From 3e88d600b04f29b5750f5f9a016ac331c9ced017 Mon Sep 17 00:00:00 2001 From: Dennis Dyatlov Date: Thu, 14 Nov 2024 16:23:27 +0000 Subject: [PATCH 1/2] tests(net): add tests for RemotingViaNodeClient --- .../Core/RemotingViaNodeClientTests.cs | 10 +++++++--- .../Sails.Remoting.Tests/Sails.Remoting.Tests.csproj | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/net/tests/Sails.Remoting.Tests/Core/RemotingViaNodeClientTests.cs b/net/tests/Sails.Remoting.Tests/Core/RemotingViaNodeClientTests.cs index 6510f45e..d4cdc017 100644 --- a/net/tests/Sails.Remoting.Tests/Core/RemotingViaNodeClientTests.cs +++ b/net/tests/Sails.Remoting.Tests/Core/RemotingViaNodeClientTests.cs @@ -1,6 +1,8 @@ using System.Threading.Tasks; using Sails.Remoting.Tests._Infra.XUnit.Fixtures; using Sails.Tests.Shared.XUnit; +using Substrate.Gear.Api.Generated; +using Substrate.NetApi.Model.Extrinsics; using Xunit; namespace Sails.Remoting.Tests.Core; @@ -17,9 +19,11 @@ public RemotingViaNodeClientTests(SailsFixture sailsFixture) [Fact] public async Task Test() { - var demoIdl = await this.sailsFixture.GetDemoContractIdlAsync(); - var demoContractWasm = await this.sailsFixture.GetDemoContractWasmAsync(); - var noSvcsProgIdl = await this.sailsFixture.GetNoSvcsProgContractIdlAsync(); var gearNodeWsUrl = this.sailsFixture.GearNodeWsUrl; + + using (var nodeClient = new SubstrateClientExt(gearNodeWsUrl, ChargeTransactionPayment.Default())) + { + await nodeClient.ConnectAsync(); + } } } diff --git a/net/tests/Sails.Remoting.Tests/Sails.Remoting.Tests.csproj b/net/tests/Sails.Remoting.Tests/Sails.Remoting.Tests.csproj index 40f83154..5a9456d0 100644 --- a/net/tests/Sails.Remoting.Tests/Sails.Remoting.Tests.csproj +++ b/net/tests/Sails.Remoting.Tests/Sails.Remoting.Tests.csproj @@ -22,6 +22,7 @@ + From 25de9e8b1b22fa9dc5410055f1dfb37e8ffaac56 Mon Sep 17 00:00:00 2001 From: Dennis Dyatlov Date: Thu, 14 Nov 2024 16:40:02 +0000 Subject: [PATCH 2/2] . --- .../Sails.Remoting.Tests/Core/RemotingViaNodeClientTests.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/tests/Sails.Remoting.Tests/Core/RemotingViaNodeClientTests.cs b/net/tests/Sails.Remoting.Tests/Core/RemotingViaNodeClientTests.cs index d4cdc017..cfd5a52c 100644 --- a/net/tests/Sails.Remoting.Tests/Core/RemotingViaNodeClientTests.cs +++ b/net/tests/Sails.Remoting.Tests/Core/RemotingViaNodeClientTests.cs @@ -1,4 +1,5 @@ -using System.Threading.Tasks; +using System; +using System.Threading.Tasks; using Sails.Remoting.Tests._Infra.XUnit.Fixtures; using Sails.Tests.Shared.XUnit; using Substrate.Gear.Api.Generated; @@ -23,6 +24,7 @@ public async Task Test() using (var nodeClient = new SubstrateClientExt(gearNodeWsUrl, ChargeTransactionPayment.Default())) { + await Task.Delay(TimeSpan.FromSeconds(3)); await nodeClient.ConnectAsync(); } }