public void TestComputeExecute([Values(true, false)] bool async)
        {
            PeerAssemblyLoadingTest.TestDeployment(remoteCompute =>
            {
                // Argument is from different assembly and should be peer deployed as well.
                var taskArg = new Address("1", 2);

                Assert.AreEqual("Apache.Ignite_Address [street=1, zip=2]", async
                    ? remoteCompute.ExecuteAsync(new ProcessNameTask(), taskArg).Result
                    : remoteCompute.Execute(new ProcessNameTask(), taskArg));
            });
        }
Exemplo n.º 2
0
        public void TestCacheGetOnRemoteNode()
        {
            TestDeployment(remoteCompute =>
            {
                var cache = remoteCompute.ClusterGroup.Ignite.GetOrCreateCache <int, Address>("addr");
                cache[1]  = new Address("street", 123);

                // This will fail for <object, object> func, because cache operations are not p2p-enabled.
                // However, generic nature of the func causes Address to be peer-deployed before cache.Get call.
                var func = new CacheGetFunc <int, Address>
                {
                    CacheName = cache.Name,
                    Key       = 1
                };

                var res = remoteCompute.Call(func);
                Assert.AreEqual("street", res.Street);
            });
        }