http://git-wip-us.apache.org/repos/asf/ignite/blob/5cec202c/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/TaskResultTest.cs ---------------------------------------------------------------------- diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/TaskResultTest.cs b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/TaskResultTest.cs new file mode 100644 index 0000000..b67e854 --- /dev/null +++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/TaskResultTest.cs @@ -0,0 +1,437 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +namespace Apache.Ignite.Core.Tests.Compute +{ + using System; + using System.Collections.Generic; + using Apache.Ignite.Core.Cluster; + using Apache.Ignite.Core.Compute; + using Apache.Ignite.Core.Portable; + using Apache.Ignite.Core.Resource; + using NUnit.Framework; + + /// <summary> + /// Tests task result. + /// </summary> + public class TaskResultTest : AbstractTaskTest + { + /** Grid name. */ + private static volatile string _gridName; + + /// <summary> + /// Constructor. + /// </summary> + public TaskResultTest() : base(false) { } + + /// <summary> + /// Constructor. + /// </summary> + /// <param name="forked">Fork flag.</param> + protected TaskResultTest(bool forked) : base(forked) { } + + /// <summary> + /// Test for task result. + /// </summary> + [Test] + public void TestTaskResultInt() + { + TestTask<int> task = new TestTask<int>(); + + int res = Grid1.Compute().Execute(task, new Tuple<bool, int>(true, 10)); + + Assert.AreEqual(10, res); + + res = Grid1.Compute().Execute(task, new Tuple<bool, int>(false, 11)); + + Assert.AreEqual(11, res); + } + + /// <summary> + /// Test for task result. + /// </summary> + [Test] + public void TestTaskResultLong() + { + TestTask<long> task = new TestTask<long>(); + + long res = Grid1.Compute().Execute(task, new Tuple<bool, long>(true, 10000000000)); + + Assert.AreEqual(10000000000, res); + + res = Grid1.Compute().Execute(task, new Tuple<bool, long>(false, 10000000001)); + + Assert.AreEqual(10000000001, res); + } + + /// <summary> + /// Test for task result. + /// </summary> + [Test] + public void TestTaskResultFloat() + { + TestTask<float> task = new TestTask<float>(); + + float res = Grid1.Compute().Execute(task, new Tuple<bool, float>(true, 1.1f)); + + Assert.AreEqual(1.1f, res); + + res = Grid1.Compute().Execute(task, new Tuple<bool, float>(false, -1.1f)); + + Assert.AreEqual(-1.1f, res); + } + + /// <summary> + /// Test for task result. + /// </summary> + [Test] + public void TestTaskResultPortable() + { + TestTask<PortableResult> task = new TestTask<PortableResult>(); + + PortableResult val = new PortableResult(100); + + PortableResult res = Grid1.Compute().Execute(task, new Tuple<bool, PortableResult>(true, val)); + + Assert.AreEqual(val.Val, res.Val); + + val.Val = 101; + + res = Grid1.Compute().Execute(task, new Tuple<bool, PortableResult>(false, val)); + + Assert.AreEqual(val.Val, res.Val); + } + + /// <summary> + /// Test for task result. + /// </summary> + [Test] + public void TestTaskResultSerializable() + { + TestTask<SerializableResult> task = new TestTask<SerializableResult>(); + + SerializableResult val = new SerializableResult(100); + + SerializableResult res = Grid1.Compute().Execute(task, new Tuple<bool, SerializableResult>(true, val)); + + Assert.AreEqual(val.Val, res.Val); + + val.Val = 101; + + res = Grid1.Compute().Execute(task, new Tuple<bool, SerializableResult>(false, val)); + + Assert.AreEqual(val.Val, res.Val); + } + + /// <summary> + /// Test for task result. + /// </summary> + [Test] + public void TestTaskResultLarge() + { + TestTask<byte[]> task = new TestTask<byte[]>(); + + byte[] res = Grid1.Compute().Execute(task, + new Tuple<bool, byte[]>(true, new byte[100 * 1024])); + + Assert.AreEqual(100 * 1024, res.Length); + + res = Grid1.Compute().Execute(task, new Tuple<bool, byte[]>(false, new byte[101 * 1024])); + + Assert.AreEqual(101 * 1024, res.Length); + } + + /** <inheritDoc /> */ + override protected void PortableTypeConfigurations(ICollection<PortableTypeConfiguration> portTypeCfgs) + { + portTypeCfgs.Add(new PortableTypeConfiguration(typeof(PortableResult))); + portTypeCfgs.Add(new PortableTypeConfiguration(typeof(TestPortableJob))); + portTypeCfgs.Add(new PortableTypeConfiguration(typeof(PortableOutFunc))); + portTypeCfgs.Add(new PortableTypeConfiguration(typeof(PortableFunc))); + } + + [Test] + public void TestOutFuncResultPrimitive1() + { + ICollection<int> res = Grid1.Compute().Broadcast(new PortableOutFunc()); + + Assert.AreEqual(3, res.Count); + + foreach (int r in res) + Assert.AreEqual(10, r); + } + + [Test] + public void TestOutFuncResultPrimitive2() + { + ICollection<int> res = Grid1.Compute().Broadcast(new SerializableOutFunc()); + + Assert.AreEqual(3, res.Count); + + foreach (int r in res) + Assert.AreEqual(10, r); + } + + [Test] + public void TestFuncResultPrimitive1() + { + ICollection<int> res = Grid1.Compute().Broadcast(new PortableFunc(), 10); + + Assert.AreEqual(3, res.Count); + + foreach (int r in res) + Assert.AreEqual(11, r); + } + + [Test] + public void TestFuncResultPrimitive2() + { + ICollection<int> res = Grid1.Compute().Broadcast(new SerializableFunc(), 10); + + Assert.AreEqual(3, res.Count); + + foreach (int r in res) + Assert.AreEqual(11, r); + } + + interface IUserInterface<in T, out TR> + { + TR Invoke(T arg); + } + + /// <summary> + /// Test function. + /// </summary> + public class PortableFunc : IComputeFunc<int, int>, IUserInterface<int, int> + { + int IComputeFunc<int, int>.Invoke(int arg) + { + return arg + 1; + } + + int IUserInterface<int, int>.Invoke(int arg) + { + // Same signature as IComputeFunc<int, int>, but from different interface + throw new Exception("Invalid method"); + } + + public int Invoke(int arg) + { + // Same signature as IComputeFunc<int, int>, + // but due to explicit interface implementation this is a wrong method + throw new Exception("Invalid method"); + } + } + + /// <summary> + /// Test function. + /// </summary> + [Serializable] + public class SerializableFunc : IComputeFunc<int, int> + { + public int Invoke(int arg) + { + return arg + 1; + } + } + + /// <summary> + /// Test function. + /// </summary> + public class PortableOutFunc : IComputeFunc<int> + { + public int Invoke() + { + return 10; + } + } + + /// <summary> + /// Test function. + /// </summary> + [Serializable] + public class SerializableOutFunc : IComputeFunc<int> + { + public int Invoke() + { + return 10; + } + } + + /// <summary> + /// Test task. + /// </summary> + public class TestTask<T> : ComputeTaskAdapter<Tuple<bool, T>, T, T> + { + /** <inheritDoc /> */ + override public IDictionary<IComputeJob<T>, IClusterNode> Map(IList<IClusterNode> subgrid, Tuple<bool, T> arg) + { + _gridName = null; + + Assert.AreEqual(3, subgrid.Count); + + bool local = arg.Item1; + T res = arg.Item2; + + var jobs = new Dictionary<IComputeJob<T>, IClusterNode>(); + + IComputeJob<T> job; + + if (res is PortableResult) + { + TestPortableJob job0 = new TestPortableJob(); + + job0.SetArguments(res); + + job = (IComputeJob<T>) job0; + } + else + { + TestJob<T> job0 = new TestJob<T>(); + + job0.SetArguments(res); + + job = job0; + } + + foreach (IClusterNode node in subgrid) + { + bool add = local ? node.IsLocal : !node.IsLocal; + + if (add) + { + jobs.Add(job, node); + + break; + } + } + + Assert.AreEqual(1, jobs.Count); + + return jobs; + } + + /** <inheritDoc /> */ + override public T Reduce(IList<IComputeJobResult<T>> results) + { + Assert.AreEqual(1, results.Count); + + var res = results[0]; + + Assert.IsNull(res.Exception()); + + Assert.IsFalse(res.Cancelled); + + Assert.IsNotNull(_gridName); + + Assert.AreEqual(GridId(_gridName), res.NodeId); + + var job = res.Job(); + + Assert.IsNotNull(job); + + return res.Data(); + } + } + + private static Guid GridId(string gridName) + { + if (gridName.Equals(Grid1Name)) + return Ignition.GetIgnite(Grid1Name).Cluster.LocalNode.Id; + if (gridName.Equals(Grid2Name)) + return Ignition.GetIgnite(Grid2Name).Cluster.LocalNode.Id; + if (gridName.Equals(Grid3Name)) + return Ignition.GetIgnite(Grid3Name).Cluster.LocalNode.Id; + + Assert.Fail("Failed to find grid " + gridName); + + return new Guid(); + } + + /// <summary> + /// + /// </summary> + class PortableResult + { + /** */ + public int Val; + + public PortableResult(int val) + { + Val = val; + } + } + + /// <summary> + /// + /// </summary> + [Serializable] + class SerializableResult + { + /** */ + public int Val; + + public SerializableResult(int val) + { + Val = val; + } + } + + /// <summary> + /// + /// </summary> + [Serializable] + class TestJob<T> : ComputeJobAdapter<T> + { + [InstanceResource] + private IIgnite _grid = null; + + /** <inheritDoc /> */ + override public T Execute() + { + Assert.IsNotNull(_grid); + + _gridName = _grid.Name; + + T res = Argument<T>(0); + + return res; + } + } + + /// <summary> + /// + /// </summary> + class TestPortableJob : ComputeJobAdapter<PortableResult> + { + [InstanceResource] + private IIgnite _grid = null; + + /** <inheritDoc /> */ + override public PortableResult Execute() + { + Assert.IsNotNull(_grid); + + _gridName = _grid.Name; + + PortableResult res = Argument<PortableResult>(0); + + return res; + } + } + } +}
http://git-wip-us.apache.org/repos/asf/ignite/blob/5cec202c/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/Cache/Store/cache-store-session.xml ---------------------------------------------------------------------- diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/Cache/Store/cache-store-session.xml b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/Cache/Store/cache-store-session.xml new file mode 100644 index 0000000..00837a9 --- /dev/null +++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/Cache/Store/cache-store-session.xml @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:util="http://www.springframework.org/schema/util" + xsi:schemaLocation=" + http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans.xsd + http://www.springframework.org/schema/util + http://www.springframework.org/schema/util/spring-util.xsd"> + <bean id="storeFactory" class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory"> + <property name="assemblyName" value="Apache.Ignite.Core.Tests"/> + <property name="className" value="Apache.Ignite.Core.Tests.Cache.Store.CacheStoreSessionTest+Store"/> + </bean> + + <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration"> + <property name="localHost" value="127.0.0.1"/> + <property name="connectorConfiguration"><null/></property> + + <property name="includeEventTypes"> + <util:constant static-field="org.apache.ignite.events.EventType.EVTS_CACHE"/> + </property> + + <property name="cacheConfiguration"> + <list> + <bean class="org.apache.ignite.configuration.CacheConfiguration"> + <property name="name" value="cache1"/> + <property name="cacheMode" value="LOCAL"/> + <property name="atomicityMode" value="TRANSACTIONAL"/> + <property name="writeThrough" value="true"/> + <property name="readThrough" value="true"/> + + <property name="cacheStoreFactory" ref="storeFactory" /> + </bean> + + <bean class="org.apache.ignite.configuration.CacheConfiguration"> + <property name="name" value="cache2"/> + <property name="cacheMode" value="LOCAL"/> + <property name="atomicityMode" value="TRANSACTIONAL"/> + <property name="writeThrough" value="true"/> + <property name="readThrough" value="true"/> + + <property name="cacheStoreFactory" ref="storeFactory" /> + </bean> + </list> + </property> + + <property name="discoverySpi"> + <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi"> + <property name="ipFinder"> + <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder"> + <property name="addresses"> + <list> + <!-- In distributed environment, replace with actual host IP address. --> + <value>127.0.0.1:47500..47501</value> + </list> + </property> + </bean> + </property> + </bean> + </property> + </bean> +</beans> http://git-wip-us.apache.org/repos/asf/ignite/blob/5cec202c/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/Compute/compute-grid1.xml ---------------------------------------------------------------------- diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/Compute/compute-grid1.xml b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/Compute/compute-grid1.xml new file mode 100644 index 0000000..183676b --- /dev/null +++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/Compute/compute-grid1.xml @@ -0,0 +1,90 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans.xsd"> + <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration"> + <property name="localHost" value="127.0.0.1"/> + <property name="connectorConfiguration"><null/></property> + + <property name="gridName" value="grid1"/> + + <property name="metricsUpdateFrequency" value="1000"/> + <property name="metricsLogFrequency" value="0"/> + + <property name="userAttributes"> + <map> + <entry key="my_attr" value="value1"/> + </map> + </property> + + <property name="cacheConfiguration"> + <list> + <bean class="org.apache.ignite.configuration.CacheConfiguration"> + <property name="startSize" value="10"/> + </bean> + <bean class="org.apache.ignite.configuration.CacheConfiguration"> + <property name="name" value="cache1"/> + <property name="startSize" value="10"/> + </bean> + <bean class="org.apache.ignite.configuration.CacheConfiguration"> + <property name="name" value="cache2"/> + <property name="startSize" value="10"/> + </bean> + </list> + </property> + + <property name="discoverySpi"> + <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi"> + <property name="ipFinder"> + <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder"> + <property name="addresses"> + <list> + <!-- In distributed environment, replace with actual host IP address. --> + <value>127.0.0.1:47500..47502</value> + </list> + </property> + </bean> + </property> + </bean> + </property> + + <!-- Portable marshaller configuration --> + <property name="marshaller"> + <bean class="org.apache.ignite.marshaller.portable.PortableMarshaller"> + <property name="typeConfigurations"> + <list> + <bean class="org.apache.ignite.portable.PortableTypeConfiguration"> + <property name="className" value="org.apache.ignite.platform.PlatformComputePortable"/> + </bean> + <bean class="org.apache.ignite.portable.PortableTypeConfiguration"> + <property name="className" value="org.apache.ignite.platform.PlatformComputeJavaPortable"/> + </bean> + <bean class="org.apache.ignite.portable.PortableTypeConfiguration"> + <property name="className" value="org.apache.ignite.platform.PlatformComputeEnum"/> + </bean> + </list> + </property> + </bean> + </property> + + </bean> +</beans> http://git-wip-us.apache.org/repos/asf/ignite/blob/5cec202c/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/Compute/compute-grid2.xml ---------------------------------------------------------------------- diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/Compute/compute-grid2.xml b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/Compute/compute-grid2.xml new file mode 100644 index 0000000..434f468 --- /dev/null +++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/Compute/compute-grid2.xml @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans.xsd"> + <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration"> + <property name="localHost" value="127.0.0.1"/> + <property name="connectorConfiguration"><null/></property> + + <property name="gridName" value="grid2"/> + + <property name="metricsUpdateFrequency" value="1000"/> + <property name="metricsLogFrequency" value="0"/> + + <property name="userAttributes"> + <map> + <entry key="my_attr" value="value2"/> + </map> + </property> + + <property name="cacheConfiguration"> + <list> + <bean class="org.apache.ignite.configuration.CacheConfiguration"> + <property name="name" value="cache1"/> + <property name="startSize" value="10"/> + </bean> + </list> + </property> + + <property name="discoverySpi"> + <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi"> + <property name="ipFinder"> + <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder"> + <property name="addresses"> + <list> + <!-- In distributed environment, replace with actual host IP address. --> + <value>127.0.0.1:47500..47502</value> + </list> + </property> + </bean> + </property> + </bean> + </property> + </bean> +</beans> http://git-wip-us.apache.org/repos/asf/ignite/blob/5cec202c/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/Compute/compute-grid3.xml ---------------------------------------------------------------------- diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/Compute/compute-grid3.xml b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/Compute/compute-grid3.xml new file mode 100644 index 0000000..31ccdf0 --- /dev/null +++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/Compute/compute-grid3.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans.xsd"> + <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration"> + <property name="localHost" value="127.0.0.1"/> + <property name="connectorConfiguration"><null/></property> + + <property name="clientMode" value="true"/> + + <property name="gridName" value="grid3"/> + + <property name="metricsUpdateFrequency" value="1000"/> + <property name="metricsLogFrequency" value="0"/> + + <property name="discoverySpi"> + <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi"> + <property name="forceServerMode" value="true"/> + + <property name="ipFinder"> + <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder"> + <property name="addresses"> + <list> + <!-- In distributed environment, replace with actual host IP address. --> + <value>127.0.0.1:47500..47502</value> + </list> + </property> + </bean> + </property> + </bean> + </property> + </bean> +</beans> http://git-wip-us.apache.org/repos/asf/ignite/blob/5cec202c/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/Compute/compute-standalone.xml ---------------------------------------------------------------------- diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/Compute/compute-standalone.xml b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/Compute/compute-standalone.xml new file mode 100644 index 0000000..bd34958 --- /dev/null +++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/Compute/compute-standalone.xml @@ -0,0 +1,87 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans.xsd"> + <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration"> + <property name="localHost" value="127.0.0.1"/> + <property name="connectorConfiguration"><null/></property> + + <property name="metricsLogFrequency" value="0"/> + + <property name="cacheConfiguration"> + <list> + <bean class="org.apache.ignite.configuration.CacheConfiguration" /> + <bean class="org.apache.ignite.configuration.CacheConfiguration"> + <property name="name" value="cache1"/> + </bean> + <bean class="org.apache.ignite.configuration.CacheConfiguration"> + <property name="name" value="cache2"/> + </bean> + </list> + </property> + + <property name="discoverySpi"> + <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi"> + <property name="ipFinder"> + <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder"> + <property name="addresses"> + <list> + <value>127.0.0.1:47500..47502</value> + </list> + </property> + </bean> + </property> + </bean> + </property> + + <property name="platformConfiguration"> + <bean class="org.apache.ignite.platform.dotnet.PlatformDotNetConfiguration"> + <property name="portableConfiguration"> + <bean class="org.apache.ignite.platform.dotnet.PlatformDotNetPortableConfiguration"> + <property name="types"> + <list> + <value>Apache.Ignite.Core.Tests.ExecutableTest+RemoteConfiguration</value> + <value>Apache.Ignite.Core.Tests.ExecutableTest+RemoteConfigurationClosure</value> + <value>Apache.Ignite.Core.Tests.Compute.TaskAdapterTest+PortableJob</value> + <value>Apache.Ignite.Core.Tests.Compute.PortableClosureTaskTest+PortableOutFunc</value> + <value>Apache.Ignite.Core.Tests.Compute.PortableClosureTaskTest+PortableFunc</value> + <value>Apache.Ignite.Core.Tests.Compute.PortableClosureTaskTest+PortableResult</value> + <value>Apache.Ignite.Core.Tests.Compute.PortableClosureTaskTest+PortableException</value> + </list> + </property> + <property name="typesConfiguration"> + <list> + <bean class="org.apache.ignite.platform.dotnet.PlatformDotNetPortableTypeConfiguration"> + <property name="typeName" value="org.apache.ignite.platform.PlatformComputePortable"/> + </bean> + <bean class="org.apache.ignite.platform.dotnet.PlatformDotNetPortableTypeConfiguration"> + <property name="typeName" value="org.apache.ignite.platform.PlatformComputeJavaPortable"/> + </bean> + </list> + </property> + </bean> + </property> + </bean> + + </property> + </bean> +</beans> http://git-wip-us.apache.org/repos/asf/ignite/blob/5cec202c/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/Dynamic/dynamic-client.xml ---------------------------------------------------------------------- diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/Dynamic/dynamic-client.xml b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/Dynamic/dynamic-client.xml new file mode 100644 index 0000000..8f8893f --- /dev/null +++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/Dynamic/dynamic-client.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:util="http://www.springframework.org/schema/util" + xsi:schemaLocation=" + http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans.xsd + http://www.springframework.org/schema/util + http://www.springframework.org/schema/util/spring-util.xsd"> + <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration"> + <property name="localHost" value="127.0.0.1"/> + <property name="connectorConfiguration"><null/></property> + + <property name="clientMode" value="true"/> + + <property name="discoverySpi"> + <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi"> + <property name="forceServerMode" value="true"/> + + <property name="ipFinder"> + <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder"> + <property name="addresses"> + <list> + <!-- In distributed environment, replace with actual host IP address. --> + <value>127.0.0.1:47500..47502</value> + </list> + </property> + </bean> + </property> + </bean> + </property> + </bean> +</beans> http://git-wip-us.apache.org/repos/asf/ignite/blob/5cec202c/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/Dynamic/dynamic-data-no-cfg.xml ---------------------------------------------------------------------- diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/Dynamic/dynamic-data-no-cfg.xml b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/Dynamic/dynamic-data-no-cfg.xml new file mode 100644 index 0000000..83c6642 --- /dev/null +++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/Dynamic/dynamic-data-no-cfg.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:util="http://www.springframework.org/schema/util" + xsi:schemaLocation=" + http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans.xsd + http://www.springframework.org/schema/util + http://www.springframework.org/schema/util/spring-util.xsd"> + <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration"> + <property name="localHost" value="127.0.0.1"/> + <property name="connectorConfiguration"><null/></property> + + <property name="discoverySpi"> + <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi"> + <property name="ipFinder"> + <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder"> + <property name="addresses"> + <list> + <!-- In distributed environment, replace with actual host IP address. --> + <value>127.0.0.1:47500..47502</value> + </list> + </property> + </bean> + </property> + </bean> + </property> + </bean> +</beans> http://git-wip-us.apache.org/repos/asf/ignite/blob/5cec202c/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/Dynamic/dynamic-data.xml ---------------------------------------------------------------------- diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/Dynamic/dynamic-data.xml b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/Dynamic/dynamic-data.xml new file mode 100644 index 0000000..dbbae90 --- /dev/null +++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/Dynamic/dynamic-data.xml @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:util="http://www.springframework.org/schema/util" + xsi:schemaLocation=" + http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans.xsd + http://www.springframework.org/schema/util + http://www.springframework.org/schema/util/spring-util.xsd"> + <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration"> + <property name="localHost" value="127.0.0.1"/> + <property name="connectorConfiguration"><null/></property> + + <property name="cacheConfiguration"> + <list> + <bean class="org.apache.ignite.configuration.CacheConfiguration"> + <property name="name" value="p"/> + <property name="cacheMode" value="PARTITIONED"/> + <property name="atomicityMode" value="TRANSACTIONAL"/> + <property name="startSize" value="10"/> + </bean> + + <bean class="org.apache.ignite.configuration.CacheConfiguration"> + <property name="name" value="pa"/> + <property name="cacheMode" value="PARTITIONED"/> + <property name="atomicityMode" value="ATOMIC"/> + <property name="startSize" value="10"/> + </bean> + </list> + </property> + + <property name="discoverySpi"> + <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi"> + <property name="ipFinder"> + <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder"> + <property name="addresses"> + <list> + <!-- In distributed environment, replace with actual host IP address. --> + <value>127.0.0.1:47500..47502</value> + </list> + </property> + </bean> + </property> + </bean> + </property> + </bean> +</beans> http://git-wip-us.apache.org/repos/asf/ignite/blob/5cec202c/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/Ignite.exe.config.test ---------------------------------------------------------------------- diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/Ignite.exe.config.test b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/Ignite.exe.config.test new file mode 100644 index 0000000..305fbd5 --- /dev/null +++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/Ignite.exe.config.test @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="utf-8"?> + +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<configuration> + <startup> + <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/> + </startup> + + <runtime> + <gcServer enabled="true" /> + </runtime> + + <appSettings> + <add key="GridGain.SpringConfigUrl" value="config\compute\compute-standalone.xml" /> + <add key="GridGain.Assembly.1" value="test-1.dll" /> + <add key="GridGain.Assembly.2" value="test-2.dll" /> + <add key="GridGain.JvmOption.1" value="-DOPT1" /> + <add key="GridGain.JvmOption.2" value="-DOPT2" /> + <add key="GridGain.JvmOption.3" value="-Xms601m" /> + <add key="GridGain.JvmOption.4" value="-Xmx702m" /> + <add key="GridGain.JvmInitialMemoryMB" value="601" /> + <add key="GridGain.JvmMaxMemoryMB" value="702" /> + </appSettings> + +</configuration> http://git-wip-us.apache.org/repos/asf/ignite/blob/5cec202c/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/Lifecycle/lifecycle-beans.xml ---------------------------------------------------------------------- diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/Lifecycle/lifecycle-beans.xml b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/Lifecycle/lifecycle-beans.xml new file mode 100644 index 0000000..da36032 --- /dev/null +++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/Lifecycle/lifecycle-beans.xml @@ -0,0 +1,66 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans.xsd"> + <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration"> + <property name="localHost" value="127.0.0.1"/> + <property name="connectorConfiguration"><null/></property> + + <property name="gridName" value="grid"/> + + <property name="discoverySpi"> + <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi"> + <property name="ipFinder"> + <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder"> + <property name="addresses"> + <list> + <value>127.0.0.1:47500..47502</value> + </list> + </property> + </bean> + </property> + </bean> + </property> + + <property name="lifecycleBeans"> + <list> + <bean class="org.apache.ignite.platform.lifecycle.PlatformJavaLifecycleBean" /> + <bean class="org.apache.ignite.platform.dotnet.PlatformDotNetLifecycleBean"> + <property name="className" value="Apache.Ignite.Core.Tests.Bean" /> + </bean> + <bean class="org.apache.ignite.platform.lifecycle.PlatformJavaLifecycleBean" /> + <bean class="org.apache.ignite.platform.dotnet.PlatformDotNetLifecycleBean"> + <property name="className" value="Apache.Ignite.Core.Tests.Bean" /> + <property name="properties"> + <map> + <entry key="Property1"> + <value type="java.lang.Integer">1</value> + </entry> + <entry key="Property2" value="1"/> + </map> + </property> + </bean> + <bean class="org.apache.ignite.platform.lifecycle.PlatformJavaLifecycleBean" /> + </list> + </property> + </bean> +</beans> http://git-wip-us.apache.org/repos/asf/ignite/blob/5cec202c/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/Lifecycle/lifecycle-no-beans.xml ---------------------------------------------------------------------- diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/Lifecycle/lifecycle-no-beans.xml b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/Lifecycle/lifecycle-no-beans.xml new file mode 100644 index 0000000..4063e6e --- /dev/null +++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/Lifecycle/lifecycle-no-beans.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans.xsd"> + <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration"> + <property name="localHost" value="127.0.0.1"/> + <property name="connectorConfiguration"><null/></property> + + <property name="gridName" value="grid"/> + + <property name="discoverySpi"> + <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi"> + <property name="ipFinder"> + <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder"> + <property name="addresses"> + <list> + <value>127.0.0.1:47500..47502</value> + </list> + </property> + </bean> + </property> + </bean> + </property> + </bean> +</beans> http://git-wip-us.apache.org/repos/asf/ignite/blob/5cec202c/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/cache-portables.xml ---------------------------------------------------------------------- diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/cache-portables.xml b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/cache-portables.xml new file mode 100644 index 0000000..84f9e5a --- /dev/null +++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/cache-portables.xml @@ -0,0 +1,78 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:util="http://www.springframework.org/schema/util" + xsi:schemaLocation=" + http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans.xsd + http://www.springframework.org/schema/util + http://www.springframework.org/schema/util/spring-util.xsd"> + <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration"> + <property name="localHost" value="127.0.0.1"/> + <property name="connectorConfiguration"><null/></property> + + <property name="platformConfiguration"> + <bean class="org.apache.ignite.platform.dotnet.PlatformDotNetConfiguration"> + <property name="portableConfiguration"> + <bean class="org.apache.ignite.platform.dotnet.PlatformDotNetPortableConfiguration"> + <property name="types"> + <list> + <value>Apache.Ignite.Core.Tests.TestGenericPortable[System.Int64]</value> + <value>Apache.Ignite.Core.Tests.TestGenericPortable[System.Type]</value> + <value>Apache.Ignite.Core.Tests.TestGenericPortable[Apache.Ignite.Core.Tests.TestGenericPortable[System.Int64]]</value> + <value>Apache.Ignite.Core.Tests.TestGenericPortable[System.Collections.Generic.List[System.Tuple[System.Int64,System.String]]]</value> + <value>Apache.Ignite.Core.Tests.TestGenericPortable[System.Int64,System.String]</value> + <value>Apache.Ignite.Core.Tests.TestGenericPortable[System.Int64,Apache.Ignite.Core.Tests.TestGenericPortable[System.String]]</value> + <value>Apache.Ignite.Core.Tests.TestGenericPortable[System.Int64,System.String,System.Type]</value> + <value>Apache.Ignite.Core.Tests.TestGenericPortable[System.Int64,System.String,Apache.Ignite.Core.Tests.TestGenericPortable[System.Int64,System.String,System.Type]]</value> + </list> + </property> + </bean> + </property> + </bean> + </property> + + <property name="includeEventTypes"> + <util:constant static-field="org.apache.ignite.events.EventType.EVTS_CACHE"/> + </property> + + <property name="cacheConfiguration"> + <list> + <bean class="org.apache.ignite.configuration.CacheConfiguration" /> + </list> + </property> + + <property name="discoverySpi"> + <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi"> + <property name="ipFinder"> + <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder"> + <property name="addresses"> + <list> + <!-- In distributed environment, replace with actual host IP address. --> + <value>127.0.0.1:47500..47501</value> + </list> + </property> + </bean> + </property> + </bean> + </property> + </bean> +</beans> http://git-wip-us.apache.org/repos/asf/ignite/blob/5cec202c/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/cache-query-continuous.xml ---------------------------------------------------------------------- diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/cache-query-continuous.xml b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/cache-query-continuous.xml new file mode 100644 index 0000000..7f9ce40 --- /dev/null +++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/cache-query-continuous.xml @@ -0,0 +1,171 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:util="http://www.springframework.org/schema/util" + xsi:schemaLocation=" + http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans.xsd + http://www.springframework.org/schema/util + http://www.springframework.org/schema/util/spring-util.xsd"> + <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration"> + <property name="localHost" value="127.0.0.1"/> + <property name="connectorConfiguration"><null/></property> + + <property name="cacheConfiguration"> + <list> + <bean class="org.apache.ignite.configuration.CacheConfiguration"> + <property name="name" value="transactional_no_backup"/> + <property name="cacheMode" value="PARTITIONED"/> + <property name="atomicityMode" value="TRANSACTIONAL"/> + <property name="writeSynchronizationMode" value="FULL_SYNC"/> + <property name="backups" value="0"/> + <property name="startSize" value="10"/> + <property name="typeMetadata"> + <list> + <bean class="org.apache.ignite.cache.CacheTypeMetadata"> + <property name="valueType" value="PortableEntry"/> + <property name="ascendingFields"> + <map> + <entry key="val" value="java.lang.Integer"/> + </map> + </property> + <property name="queryFields"> + <map> + <entry key="val" value="java.lang.Integer"/> + </map> + </property> + <property name="textFields"> + <list> + <value>val</value> + </list> + </property> + </bean> + </list> + </property> + </bean> + <bean class="org.apache.ignite.configuration.CacheConfiguration"> + <property name="name" value="transactional_backup"/> + <property name="cacheMode" value="PARTITIONED"/> + <property name="atomicityMode" value="TRANSACTIONAL"/> + <property name="writeSynchronizationMode" value="FULL_SYNC"/> + <property name="backups" value="1"/> + <property name="startSize" value="10"/> + <property name="typeMetadata"> + <list> + <bean class="org.apache.ignite.cache.CacheTypeMetadata"> + <property name="valueType" value="PortableEntry"/> + <property name="ascendingFields"> + <map> + <entry key="val" value="java.lang.Integer"/> + </map> + </property> + <property name="queryFields"> + <map> + <entry key="val" value="java.lang.Integer"/> + </map> + </property> + <property name="textFields"> + <list> + <value>val</value> + </list> + </property> + </bean> + </list> + </property> + </bean> + <bean class="org.apache.ignite.configuration.CacheConfiguration"> + <property name="name" value="atomic_no_backup"/> + <property name="cacheMode" value="PARTITIONED"/> + <property name="atomicityMode" value="ATOMIC"/> + <property name="writeSynchronizationMode" value="FULL_SYNC"/> + <property name="backups" value="0"/> + <property name="startSize" value="10"/> + <property name="typeMetadata"> + <list> + <bean class="org.apache.ignite.cache.CacheTypeMetadata"> + <property name="valueType" value="PortableEntry"/> + <property name="ascendingFields"> + <map> + <entry key="val" value="java.lang.Integer"/> + </map> + </property> + <property name="queryFields"> + <map> + <entry key="val" value="java.lang.Integer"/> + </map> + </property> + <property name="textFields"> + <list> + <value>val</value> + </list> + </property> + </bean> + </list> + </property> + </bean> + <bean class="org.apache.ignite.configuration.CacheConfiguration"> + <property name="name" value="atomic_backup"/> + <property name="cacheMode" value="PARTITIONED"/> + <property name="atomicityMode" value="ATOMIC"/> + <property name="writeSynchronizationMode" value="FULL_SYNC"/> + <property name="backups" value="1"/> + <property name="startSize" value="10"/> + <property name="typeMetadata"> + <list> + <bean class="org.apache.ignite.cache.CacheTypeMetadata"> + <property name="valueType" value="PortableEntry"/> + <property name="ascendingFields"> + <map> + <entry key="val" value="java.lang.Integer"/> + </map> + </property> + <property name="queryFields"> + <map> + <entry key="val" value="java.lang.Integer"/> + </map> + </property> + <property name="textFields"> + <list> + <value>val</value> + </list> + </property> + </bean> + </list> + </property> + </bean> + </list> + </property> + + <property name="discoverySpi"> + <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi"> + <property name="ipFinder"> + <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder"> + <property name="addresses"> + <list> + <!-- In distributed environment, replace with actual host IP address. --> + <value>127.0.0.1:47500..47501</value> + </list> + </property> + </bean> + </property> + </bean> + </property> + </bean> +</beans> http://git-wip-us.apache.org/repos/asf/ignite/blob/5cec202c/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/cache-query.xml ---------------------------------------------------------------------- diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/cache-query.xml b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/cache-query.xml new file mode 100644 index 0000000..787a921 --- /dev/null +++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/cache-query.xml @@ -0,0 +1,100 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:util="http://www.springframework.org/schema/util" + xsi:schemaLocation=" + http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans.xsd + http://www.springframework.org/schema/util + http://www.springframework.org/schema/util/spring-util.xsd"> + <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration"> + <property name="localHost" value="127.0.0.1"/> + <property name="connectorConfiguration"><null/></property> + + <property name="platformConfiguration"> + <bean class="org.apache.ignite.platform.dotnet.PlatformDotNetConfiguration"> + <property name="portableConfiguration"> + <bean class="org.apache.ignite.platform.dotnet.PlatformDotNetPortableConfiguration"> + <property name="types"> + <list> + <value>Apache.Ignite.Core.Tests.Cache.Query.QueryPerson</value> + </list> + </property> + </bean> + </property> + </bean> + </property> + + <property name="includeEventTypes"> + <util:constant static-field="org.apache.ignite.events.EventType.EVTS_CACHE"/> + </property> + + <property name="cacheConfiguration"> + <list> + <bean class="org.apache.ignite.configuration.CacheConfiguration"> + <property name="name" value="cache"/> + <property name="cacheMode" value="PARTITIONED"/> + <property name="atomicityMode" value="TRANSACTIONAL"/> + <property name="writeSynchronizationMode" value="FULL_SYNC"/> + + <property name="typeMetadata"> + <list> + <bean class="org.apache.ignite.cache.CacheTypeMetadata"> + <property name="valueType" value="QueryPerson"/> + <property name="ascendingFields"> + <map> + <entry key="age" value="java.lang.Integer"/> + </map> + </property> + <property name="queryFields"> + <map> + <entry key="name" value="java.lang.String"/> + <entry key="age" value="java.lang.Integer"/> + </map> + </property> + <property name="textFields"> + <list> + <value>name</value> + </list> + </property> + </bean> + </list> + </property> + </bean> + </list> + </property> + + <property name="discoverySpi"> + <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi"> + <property name="ipFinder"> + <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder"> + <property name="addresses"> + <list> + <!-- In distributed environment, replace with actual host IP address. --> + <value>127.0.0.1:47500..47501</value> + </list> + </property> + </bean> + </property> + </bean> + </property> + </bean> +</beans> http://git-wip-us.apache.org/repos/asf/ignite/blob/5cec202c/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/marshaller-default.xml ---------------------------------------------------------------------- diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/marshaller-default.xml b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/marshaller-default.xml new file mode 100644 index 0000000..753fad1 --- /dev/null +++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/marshaller-default.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans.xsd"> + <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration"> + <property name="localHost" value="127.0.0.1"/> + <property name="connectorConfiguration"><null/></property> + + <property name="discoverySpi"> + <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi"> + <property name="ipFinder"> + <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder"> + <property name="addresses"> + <list> + <!-- In distributed environment, replace with actual host IP address. --> + <value>127.0.0.1:47500..47502</value> + </list> + </property> + </bean> + </property> + </bean> + </property> + </bean> +</beans> http://git-wip-us.apache.org/repos/asf/ignite/blob/5cec202c/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/marshaller-invalid.xml ---------------------------------------------------------------------- diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/marshaller-invalid.xml b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/marshaller-invalid.xml new file mode 100644 index 0000000..188781d --- /dev/null +++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/marshaller-invalid.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans.xsd"> + <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration"> + <property name="localHost" value="127.0.0.1"/> + <property name="connectorConfiguration"><null/></property> + + <property name="marshaller"> + <bean class="org.apache.ignite.marshaller.optimized.OptimizedMarshaller" /> + </property> + + <property name="discoverySpi"> + <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi"> + <property name="ipFinder"> + <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder"> + <property name="addresses"> + <list> + <!-- In distributed environment, replace with actual host IP address. --> + <value>127.0.0.1:47500..47502</value> + </list> + </property> + </bean> + </property> + </bean> + </property> + </bean> +</beans> http://git-wip-us.apache.org/repos/asf/ignite/blob/5cec202c/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/marshaller-portable.xml ---------------------------------------------------------------------- diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/marshaller-portable.xml b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/marshaller-portable.xml new file mode 100644 index 0000000..753fad1 --- /dev/null +++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/marshaller-portable.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans.xsd"> + <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration"> + <property name="localHost" value="127.0.0.1"/> + <property name="connectorConfiguration"><null/></property> + + <property name="discoverySpi"> + <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi"> + <property name="ipFinder"> + <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder"> + <property name="addresses"> + <list> + <!-- In distributed environment, replace with actual host IP address. --> + <value>127.0.0.1:47500..47502</value> + </list> + </property> + </bean> + </property> + </bean> + </property> + </bean> +</beans> http://git-wip-us.apache.org/repos/asf/ignite/blob/5cec202c/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/native-client-test-cache-affinity.xml ---------------------------------------------------------------------- diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/native-client-test-cache-affinity.xml b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/native-client-test-cache-affinity.xml new file mode 100644 index 0000000..f08018d --- /dev/null +++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/native-client-test-cache-affinity.xml @@ -0,0 +1,70 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans.xsd"> + <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration"> + <property name="localHost" value="127.0.0.1"/> + + <property name="connectorConfiguration"><null/></property> + + <property name="platformConfiguration"> + <bean class="org.apache.ignite.platform.dotnet.PlatformDotNetConfiguration"> + <property name="portableConfiguration"> + <bean class="org.apache.ignite.platform.dotnet.PlatformDotNetPortableConfiguration"> + <property name="typesConfiguration"> + <list> + <bean class="org.apache.ignite.platform.dotnet.PlatformDotNetPortableTypeConfiguration"> + <property name="typeName" + value="Apache.Ignite.Core.Tests.Cache.CacheAffinityTest+AffinityTestKey"/> + <property name="affinityKeyFieldName" value="_affKey"/> + </bean> + </list> + </property> + </bean> + </property> + </bean> + </property> + + <property name="cacheConfiguration"> + <list> + <bean class="org.apache.ignite.configuration.CacheConfiguration"> + <property name="cacheMode" value="PARTITIONED"/> + </bean> + </list> + </property> + + <property name="discoverySpi"> + <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi"> + <property name="ipFinder"> + <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder"> + <property name="addresses"> + <list> + <!-- In distributed environment, replace with actual host IP address. --> + <value>127.0.0.1:47500..47501</value> + </list> + </property> + </bean> + </property> + </bean> + </property> + </bean> +</beans> http://git-wip-us.apache.org/repos/asf/ignite/blob/5cec202c/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/native-client-test-cache-parallel-store.xml ---------------------------------------------------------------------- diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/native-client-test-cache-parallel-store.xml b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/native-client-test-cache-parallel-store.xml new file mode 100644 index 0000000..00e8e45 --- /dev/null +++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Config/native-client-test-cache-parallel-store.xml @@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:util="http://www.springframework.org/schema/util" + xsi:schemaLocation=" + http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans.xsd + http://www.springframework.org/schema/util + http://www.springframework.org/schema/util/spring-util.xsd"> + <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration"> + <property name="localHost" value="127.0.0.1"/> + <property name="connectorConfiguration"><null/></property> + + <property name="includeEventTypes"> + <util:constant static-field="org.apache.ignite.events.EventType.EVTS_CACHE"/> + </property> + + <property name="cacheConfiguration"> + <list> + <bean class="org.apache.ignite.configuration.CacheConfiguration"> + <property name="name" value="object_store_parallel"/> + <property name="cacheMode" value="LOCAL"/> + <property name="atomicityMode" value="TRANSACTIONAL"/> + <property name="keepPortableInStore" value="false"/> + + <property name="cacheStoreFactory"> + <bean class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory"> + <property name="assemblyName" value="Apache.Ignite.Core.Tests"/> + <property name="className" value="Apache.Ignite.Core.Tests.Cache.Store.CacheTestParallelLoadStore"/> + </bean> + </property> + </bean> + </list> + </property> + + <property name="discoverySpi"> + <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi"> + <property name="ipFinder"> + <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder"> + <property name="addresses"> + <list> + <!-- In distributed environment, replace with actual host IP address. --> + <value>127.0.0.1:47500..47501</value> + </list> + </property> + </bean> + </property> + </bean> + </property> + </bean> +</beans>
