This is an automated email from the ASF dual-hosted git repository. nizhikov pushed a commit to branch IGNITE-16083 in repository https://gitbox.apache.org/repos/asf/ignite.git
commit 57421d32f188cdc7c4690a2f06cf9afee194ee8f Author: Nikolay <[email protected]> AuthorDate: Fri Dec 17 16:21:11 2021 +0300 IGNITE-16083 WIP --- .../Services/ServicesTypeAutoResolveTest.cs | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Services/ServicesTypeAutoResolveTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Services/ServicesTypeAutoResolveTest.cs index 17bb21c..c17e18a 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Services/ServicesTypeAutoResolveTest.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Services/ServicesTypeAutoResolveTest.cs @@ -22,8 +22,13 @@ namespace Apache.Ignite.Core.Tests.Services using System.Collections.Generic; using System.IO; using System.Linq; + using System.Net; using System.Reflection; + using System.Security.Authentication; using Apache.Ignite.Core.Binary; + using Apache.Ignite.Core.Client; + using Apache.Ignite.Core.Log; + using Apache.Ignite.Core.Tests.Client.Cache; using NUnit.Framework; using Apache.Ignite.Platform.Model; @@ -64,6 +69,9 @@ namespace Apache.Ignite.Core.Tests.Services private IIgnite _client; /** */ + private IIgniteClient _thinClient; + + /** */ public ServicesTypeAutoResolveTest() { // No-op. @@ -171,6 +179,24 @@ namespace Apache.Ignite.Core.Tests.Services } /// <summary> + /// Tests Java service invocation. + /// </summary> + [Test] + public void TestCallJavaServiceThinClient() + { + DoTestService(_thinClient.GetServices().GetServiceProxy<IJavaService>(_javaSvcName)); + } + + /// <summary> + /// Tests Java service invocation. + /// </summary> + [Test] + public void TestCallPlatformServiceThinClient() + { + DoTestService(_thinClient.GetServices().GetServiceProxy<IJavaService>(PlatformSvcName)); + } + + /// <summary> /// Tests service invocation. /// </summary> public void DoTestService(IJavaService svc, bool isPlatform = false) @@ -280,6 +306,7 @@ namespace Apache.Ignite.Core.Tests.Services "client_work"); _client = Ignition.Start(cfg); + _thinClient = Ignition.StartClient(GetClientConfiguration()); } /// <summary> @@ -309,6 +336,21 @@ namespace Apache.Ignite.Core.Tests.Services LifecycleHandlers = _useBinaryArray ? new[] { new SetUseBinaryArray() } : null }; } + + /// <summary> + /// Gets the client configuration. + /// </summary> + protected IgniteClientConfiguration GetClientConfiguration() + { + var port = IgniteClientConfiguration.DefaultPort; + + return new IgniteClientConfiguration + { + Endpoints = new List<string> {IPAddress.Loopback + ":" + port}, + SocketTimeout = TimeSpan.FromSeconds(15), + Logger = new ListLogger(new ConsoleLogger {MinLevel = LogLevel.Trace}) + }; + } } /// <summary>
