Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IGNITE-22524 .NET: Add JobDescriptor to Compute API #3954

Merged
merged 15 commits into from
Jun 19, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ namespace Apache.Ignite.Tests;

using System;
using System.Threading.Tasks;
using Compute;
using Ignite.Compute;
using NUnit.Framework;
using Security.Exception;

Expand Down Expand Up @@ -99,7 +97,7 @@ private async Task EnableAuthn(bool enable)

try
{
await client.Compute.SubmitAsync<object>(nodes, Array.Empty<DeploymentUnit>(), EnableAuthnJob, enable ? 1 : 0);
await client.Compute.SubmitAsync<object>(nodes, new(EnableAuthnJob), enable ? 1 : 0);
}
catch (IgniteClientConnectionException)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

namespace Apache.Ignite.Tests.Compute
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
Expand Down Expand Up @@ -46,10 +45,10 @@ public async Task TestClientSendsComputeJobToTargetNodeWhenDirectConnectionExist
client.WaitForConnections(3);

IJobExecution<string> exec2 = await client.Compute.SubmitAsync<string>(
new[] { server2.Node }, Array.Empty<DeploymentUnit>(), jobClassName: string.Empty);
new[] { server2.Node }, new(string.Empty));

IJobExecution<string> exec3 = await client.Compute.SubmitAsync<string>(
new[] { server3.Node }, Array.Empty<DeploymentUnit>(), jobClassName: string.Empty);
new[] { server3.Node }, new(string.Empty));

Assert.AreEqual("s2", await exec2.GetResultAsync());
Assert.AreEqual("s3", await exec3.GetResultAsync());
Expand All @@ -70,10 +69,10 @@ public async Task TestClientSendsComputeJobToDefaultNodeWhenDirectConnectionToTa
using var client = await server1.ConnectClientAsync();

IJobExecution<string> exec2 = await client.Compute.SubmitAsync<string>(
new[] { server2.Node }, Array.Empty<DeploymentUnit>(), jobClassName: string.Empty);
new[] { server2.Node }, new(string.Empty));

IJobExecution<string> exec3 = await client.Compute.SubmitAsync<string>(
new[] { server3.Node }, Array.Empty<DeploymentUnit>(), jobClassName: string.Empty);
new[] { server3.Node }, new(string.Empty));

Assert.AreEqual("s1", await exec2.GetResultAsync());
Assert.AreEqual("s1", await exec3.GetResultAsync());
Expand Down Expand Up @@ -107,7 +106,7 @@ public async Task TestClientRetriesComputeJobOnPrimaryAndDefaultNodes()
var node = i % 2 == 0 ? server1.Node : server2.Node;

IJobExecution<string> jobExecution = await client.Compute.SubmitAsync<string>(
new[] { node }, Array.Empty<DeploymentUnit>(), jobClassName: string.Empty);
new[] { node }, new(string.Empty));

string res = await jobExecution.GetResultAsync();

Expand Down

This file was deleted.

Loading