http://git-wip-us.apache.org/repos/asf/ignite/blob/ed658597/modules/platforms/cpp/project/vs/ignite_x86.slnrel ---------------------------------------------------------------------- diff --git a/modules/platforms/cpp/project/vs/ignite_x86.slnrel b/modules/platforms/cpp/project/vs/ignite_x86.slnrel index abd0ad1..44308aa 100644 --- a/modules/platforms/cpp/project/vs/ignite_x86.slnrel +++ b/modules/platforms/cpp/project/vs/ignite_x86.slnrel @@ -19,6 +19,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "common", "..\..\common\proj EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jni", "..\..\jni\project\vs\jni.vcxproj", "{4F7E4917-4612-4B96-9838-025711ADE391}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "thin-client", "..\..\thin-client\project\vs\thin-client.vcxproj", "{5C037386-B5F5-4A58-9EE2-3D3A508AA866}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Release|Win32 = Release|Win32 @@ -68,8 +70,19 @@ Global {4F7E4917-4612-4B96-9838-025711ADE391}.Release|Win32.Build.0 = Release|Win32 {4F7E4917-4612-4B96-9838-025711ADE391}.Release|x64.ActiveCfg = Release|x64 {4F7E4917-4612-4B96-9838-025711ADE391}.Release|x64.Build.0 = Release|x64 + {5C037386-B5F5-4A58-9EE2-3D3A508AA866}.Debug|Win32.ActiveCfg = Debug|Win32 + {5C037386-B5F5-4A58-9EE2-3D3A508AA866}.Debug|Win32.Build.0 = Debug|Win32 + {5C037386-B5F5-4A58-9EE2-3D3A508AA866}.Debug|x64.ActiveCfg = Debug|x64 + {5C037386-B5F5-4A58-9EE2-3D3A508AA866}.Debug|x64.Build.0 = Debug|x64 + {5C037386-B5F5-4A58-9EE2-3D3A508AA866}.Release|Win32.ActiveCfg = Release|Win32 + {5C037386-B5F5-4A58-9EE2-3D3A508AA866}.Release|Win32.Build.0 = Release|Win32 + {5C037386-B5F5-4A58-9EE2-3D3A508AA866}.Release|x64.ActiveCfg = Release|x64 + {5C037386-B5F5-4A58-9EE2-3D3A508AA866}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {3761BFB8-4345-4AC4-BE04-5ACB1DCA842C} + EndGlobalSection EndGlobal
http://git-wip-us.apache.org/repos/asf/ignite/blob/ed658597/modules/platforms/cpp/thin-client-test/Makefile.am ---------------------------------------------------------------------- diff --git a/modules/platforms/cpp/thin-client-test/Makefile.am b/modules/platforms/cpp/thin-client-test/Makefile.am new file mode 100644 index 0000000..e4ab9a4 --- /dev/null +++ b/modules/platforms/cpp/thin-client-test/Makefile.am @@ -0,0 +1,74 @@ +## +## 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. +## + +ACLOCAL_AMFLAGS =-I m4 + +noinst_PROGRAMS = ignite-thin-client-tests + +SUBDIRS = \ + include + +AM_CPPFLAGS = \ + -I$(srcdir)/include \ + -I@top_srcdir@/core/include \ + -I@top_srcdir@/core/os/linux/include \ + -I@top_srcdir@/common/include \ + -I@top_srcdir@/common/os/linux/include \ + -I@top_srcdir@/binary/include \ + -I@top_srcdir@/jni/include \ + -I@top_srcdir@/jni/os/linux/include \ + -I@top_srcdir@/thin-client/include \ + -I@top_srcdir@/thin-client/os/linux/include \ + -I$(JAVA_HOME)/include \ + -I$(JAVA_HOME)/include/linux \ + -DIGNITE_IMPL \ + -D__STDC_LIMIT_MACROS \ + -D__STDC_CONSTANT_MACROS + +AM_CXXFLAGS = \ + -Wall \ + -std=c++03 + +ignite_thin_client_tests_LDADD = \ + @top_srcdir@/core/libignite.la \ + @top_srcdir@/thin-client/libignite-thin-client.la \ + -lpthread \ + -lboost_thread \ + -lboost_system \ + -lboost_chrono + +ignite_thin_client_tests_LDFLAGS = \ + -static-libtool-libs \ + -rdynamic + +ignite_thin_client_tests_SOURCES = \ + src/cache_client_test.cpp \ + src/teamcity/teamcity_boost.cpp \ + src/teamcity/teamcity_messages.cpp \ + src/test_utils.cpp \ + src/ignite_client_test.cpp \ + src/auth_test.cpp \ + src/ssl_test.cpp + +run-check: check + ./ignite-thin-client-tests -p + +clean-local: clean-check + $(RM) *.gcno *.gcda + +clean-check: + $(RM) $(ignite_thin_client_tests_OBJECTS) http://git-wip-us.apache.org/repos/asf/ignite/blob/ed658597/modules/platforms/cpp/thin-client-test/config/auth-32.xml ---------------------------------------------------------------------- diff --git a/modules/platforms/cpp/thin-client-test/config/auth-32.xml b/modules/platforms/cpp/thin-client-test/config/auth-32.xml new file mode 100644 index 0000000..c4ba75c --- /dev/null +++ b/modules/platforms/cpp/thin-client-test/config/auth-32.xml @@ -0,0 +1,48 @@ +<?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"> + + <import resource="auth-default.xml"/> + + <bean parent="test.cfg"> + <property name="memoryConfiguration"> + <bean class="org.apache.ignite.configuration.MemoryConfiguration"> + <property name="systemCacheInitialSize" value="#{10 * 1024 * 1024}"/> + <property name="systemCacheMaxSize" value="#{40 * 1024 * 1024}"/> + <property name="defaultMemoryPolicyName" value="dfltPlc"/> + + <property name="memoryPolicies"> + <list> + <bean class="org.apache.ignite.configuration.MemoryPolicyConfiguration"> + <property name="name" value="dfltPlc"/> + <property name="maxSize" value="#{100 * 1024 * 1024}"/> + <property name="initialSize" value="#{10 * 1024 * 1024}"/> + </bean> + </list> + </property> + </bean> + </property> + </bean> +</beans> http://git-wip-us.apache.org/repos/asf/ignite/blob/ed658597/modules/platforms/cpp/thin-client-test/config/auth-default.xml ---------------------------------------------------------------------- diff --git a/modules/platforms/cpp/thin-client-test/config/auth-default.xml b/modules/platforms/cpp/thin-client-test/config/auth-default.xml new file mode 100644 index 0000000..3d197e7 --- /dev/null +++ b/modules/platforms/cpp/thin-client-test/config/auth-default.xml @@ -0,0 +1,77 @@ +<?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"> + + <!-- + Initialize property configurer so we can reference environment variables. + --> + <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> + <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_FALLBACK"/> + <property name="searchSystemEnvironment" value="true"/> + </bean> + + <bean abstract="true" id="test.cfg" class="org.apache.ignite.configuration.IgniteConfiguration"> + <property name="localHost" value="127.0.0.1"/> + <property name="connectorConfiguration"><null/></property> + + <property name="authenticationEnabled" value="true"/> + + <property name="persistentStoreConfiguration"> + <bean class="org.apache.ignite.configuration.PersistentStoreConfiguration"/> + </property> + + <property name="clientConnectorConfiguration"> + <bean class="org.apache.ignite.configuration.ClientConnectorConfiguration"> + <property name="host" value="127.0.0.1"/> + <property name="port" value="11110"/> + <property name="portRange" value="10"/> + </bean> + </property> + + <!-- Explicitly configure TCP discovery SPI to provide list of initial nodes. --> + <property name="discoverySpi"> + <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi"> + <property name="ipFinder"> + <!-- + Ignite provides several options for automatic discovery that can be used + instead os static IP based discovery. + --> + <!-- Uncomment static IP finder to enable static-based discovery of initial nodes. --> + <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</value> + </list> + </property> + </bean> + </property> + <property name="socketTimeout" value="300" /> + </bean> + </property> + </bean> +</beans> http://git-wip-us.apache.org/repos/asf/ignite/blob/ed658597/modules/platforms/cpp/thin-client-test/config/auth.xml ---------------------------------------------------------------------- diff --git a/modules/platforms/cpp/thin-client-test/config/auth.xml b/modules/platforms/cpp/thin-client-test/config/auth.xml new file mode 100644 index 0000000..f5af829 --- /dev/null +++ b/modules/platforms/cpp/thin-client-test/config/auth.xml @@ -0,0 +1,31 @@ +<?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"> + + <import resource="auth-default.xml"/> + + <bean parent="test.cfg"/> + +</beans> http://git-wip-us.apache.org/repos/asf/ignite/blob/ed658597/modules/platforms/cpp/thin-client-test/config/cache-32.xml ---------------------------------------------------------------------- diff --git a/modules/platforms/cpp/thin-client-test/config/cache-32.xml b/modules/platforms/cpp/thin-client-test/config/cache-32.xml new file mode 100644 index 0000000..ecccd0d --- /dev/null +++ b/modules/platforms/cpp/thin-client-test/config/cache-32.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. +--> + +<!-- + Ignite Spring configuration file to startup grid cache. +--> +<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"> + <import resource="cache-default.xml"/> + + <bean parent="grid.cfg"> + <property name="memoryConfiguration"> + <bean class="org.apache.ignite.configuration.MemoryConfiguration"> + <property name="systemCacheInitialSize" value="#{10 * 1024 * 1024}"/> + <property name="systemCacheMaxSize" value="#{40 * 1024 * 1024}"/> + <property name="defaultMemoryPolicyName" value="dfltPlc"/> + + <property name="memoryPolicies"> + <list> + <bean class="org.apache.ignite.configuration.MemoryPolicyConfiguration"> + <property name="name" value="dfltPlc"/> + <property name="maxSize" value="#{100 * 1024 * 1024}"/> + <property name="initialSize" value="#{10 * 1024 * 1024}"/> + </bean> + </list> + </property> + </bean> + </property> + </bean> +</beans> http://git-wip-us.apache.org/repos/asf/ignite/blob/ed658597/modules/platforms/cpp/thin-client-test/config/cache-default.xml ---------------------------------------------------------------------- diff --git a/modules/platforms/cpp/thin-client-test/config/cache-default.xml b/modules/platforms/cpp/thin-client-test/config/cache-default.xml new file mode 100644 index 0000000..8ed4437 --- /dev/null +++ b/modules/platforms/cpp/thin-client-test/config/cache-default.xml @@ -0,0 +1,141 @@ +<?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. +--> + +<!-- + Ignite Spring configuration file to startup grid cache. +--> +<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 abstract="true" id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration"> + <property name="localHost" value="127.0.0.1"/> + <property name="connectorConfiguration"><null/></property> + + <property name="clientConnectorConfiguration"> + <bean class="org.apache.ignite.configuration.ClientConnectorConfiguration"> + <property name="host" value="127.0.0.1"/> + <property name="port" value="11110"/> + <property name="portRange" value="10"/> + </bean> + </property> + + <property name="includeEventTypes"> + <util:constant static-field="org.apache.ignite.events.EventType.EVTS_CACHE"/> + </property> + + <property name="cacheConfiguration"> + <list> + <bean parent="cache-template"> + <property name="name" value="local"/> + <property name="cacheMode" value="LOCAL"/> + <property name="atomicityMode" value="TRANSACTIONAL"/> + </bean> + + <bean parent="cache-template"> + <property name="name" value="local_atomic"/> + <property name="cacheMode" value="LOCAL"/> + <property name="atomicityMode" value="ATOMIC"/> + </bean> + + <bean parent="cache-template"> + <property name="name" value="partitioned"/> + <property name="cacheMode" value="PARTITIONED"/> + <property name="atomicityMode" value="TRANSACTIONAL"/> + <property name="onheapCacheEnabled" value="true"/> + </bean> + + <bean parent="cache-template"> + <property name="name" value="partitioned2"/> + <property name="cacheMode" value="PARTITIONED"/> + <property name="atomicityMode" value="TRANSACTIONAL"/> + </bean> + + <bean parent="cache-template"> + <property name="name" value="partitioned_atomic"/> + <property name="cacheMode" value="PARTITIONED"/> + <property name="atomicityMode" value="ATOMIC"/> + </bean> + + <bean parent="cache-template"> + <property name="name" value="partitioned_near"/> + <property name="cacheMode" value="PARTITIONED"/> + <property name="atomicityMode" value="TRANSACTIONAL"/> + <property name="nearConfiguration"> + <bean class="org.apache.ignite.configuration.NearCacheConfiguration" /> + </property> + </bean> + + <bean parent="cache-template"> + <property name="name" value="partitioned_atomic_near"/> + <property name="cacheMode" value="PARTITIONED"/> + <property name="atomicityMode" value="ATOMIC"/> + <property name="nearConfiguration"> + <bean class="org.apache.ignite.configuration.NearCacheConfiguration" /> + </property> + </bean> + + <bean parent="cache-template"> + <property name="name" value="replicated"/> + <property name="cacheMode" value="REPLICATED"/> + <property name="atomicityMode" value="TRANSACTIONAL"/> + </bean> + + <bean parent="cache-template"> + <property name="name" value="replicated_atomic"/> + <property name="cacheMode" value="REPLICATED"/> + <property name="atomicityMode" value="ATOMIC"/> + </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..47503</value> + </list> + </property> + </bean> + </property> + <property name="socketTimeout" value="300" /> + </bean> + </property> + + <property name="transactionConfiguration"> + <bean class="org.apache.ignite.configuration.TransactionConfiguration"> + <property name="txSerializableEnabled" value="true"/> + </bean> + </property> + </bean> + + <bean id="cache-template" abstract="true" class="org.apache.ignite.configuration.CacheConfiguration"> + <property name="rebalanceMode" value="SYNC"/> + <property name="writeSynchronizationMode" value="FULL_SYNC"/> + <property name="backups" value="1"/> + <property name="eagerTtl" value="true"/> + </bean> +</beans> http://git-wip-us.apache.org/repos/asf/ignite/blob/ed658597/modules/platforms/cpp/thin-client-test/config/cache.xml ---------------------------------------------------------------------- diff --git a/modules/platforms/cpp/thin-client-test/config/cache.xml b/modules/platforms/cpp/thin-client-test/config/cache.xml new file mode 100644 index 0000000..54df16e --- /dev/null +++ b/modules/platforms/cpp/thin-client-test/config/cache.xml @@ -0,0 +1,35 @@ +<?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. +--> + +<!-- + Ignite Spring configuration file to startup grid cache. +--> +<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"> + <import resource="cache-default.xml"/> + + <bean parent="grid.cfg"/> + +</beans> http://git-wip-us.apache.org/repos/asf/ignite/blob/ed658597/modules/platforms/cpp/thin-client-test/config/ssl-32.xml ---------------------------------------------------------------------- diff --git a/modules/platforms/cpp/thin-client-test/config/ssl-32.xml b/modules/platforms/cpp/thin-client-test/config/ssl-32.xml new file mode 100644 index 0000000..0750580 --- /dev/null +++ b/modules/platforms/cpp/thin-client-test/config/ssl-32.xml @@ -0,0 +1,48 @@ +<?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"> + + <import resource="ssl-default.xml"/> + + <bean parent="test.cfg"> + <property name="memoryConfiguration"> + <bean class="org.apache.ignite.configuration.MemoryConfiguration"> + <property name="systemCacheInitialSize" value="#{10 * 1024 * 1024}"/> + <property name="systemCacheMaxSize" value="#{40 * 1024 * 1024}"/> + <property name="defaultMemoryPolicyName" value="dfltPlc"/> + + <property name="memoryPolicies"> + <list> + <bean class="org.apache.ignite.configuration.MemoryPolicyConfiguration"> + <property name="name" value="dfltPlc"/> + <property name="maxSize" value="#{100 * 1024 * 1024}"/> + <property name="initialSize" value="#{10 * 1024 * 1024}"/> + </bean> + </list> + </property> + </bean> + </property> + </bean> +</beans> http://git-wip-us.apache.org/repos/asf/ignite/blob/ed658597/modules/platforms/cpp/thin-client-test/config/ssl-default.xml ---------------------------------------------------------------------- diff --git a/modules/platforms/cpp/thin-client-test/config/ssl-default.xml b/modules/platforms/cpp/thin-client-test/config/ssl-default.xml new file mode 100644 index 0000000..bbd0dd8 --- /dev/null +++ b/modules/platforms/cpp/thin-client-test/config/ssl-default.xml @@ -0,0 +1,84 @@ +<?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"> + + <!-- + Initialize property configurer so we can reference environment variables. + --> + <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> + <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_FALLBACK"/> + <property name="searchSystemEnvironment" value="true"/> + </bean> + + <bean abstract="true" id="test.cfg" class="org.apache.ignite.configuration.IgniteConfiguration"> + <property name="localHost" value="127.0.0.1"/> + <property name="connectorConfiguration"><null/></property> + + <property name="clientConnectorConfiguration"> + <bean class="org.apache.ignite.configuration.ClientConnectorConfiguration"> + <property name="host" value="127.0.0.1"/> + <property name="port" value="11110"/> + <property name="portRange" value="10"/> + <property name="sslEnabled" value="true"/> + <property name="useIgniteSslContextFactory" value="false"/> + <property name="sslClientAuth" value="true"/> + + <!-- Provide Ssl context. --> + <property name="sslContextFactory"> + <bean class="org.apache.ignite.ssl.SslContextFactory"> + <property name="keyStoreFilePath" value="${IGNITE_NATIVE_TEST_CPP_THIN_CONFIG_PATH}/ssl/server.jks"/> + <property name="keyStorePassword" value="123456"/> + <property name="trustStoreFilePath" value="${IGNITE_NATIVE_TEST_CPP_THIN_CONFIG_PATH}/ssl/trust.jks"/> + <property name="trustStorePassword" value="123456"/> + </bean> + </property> + </bean> + </property> + + <!-- Explicitly configure TCP discovery SPI to provide list of initial nodes. --> + <property name="discoverySpi"> + <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi"> + <property name="ipFinder"> + <!-- + Ignite provides several options for automatic discovery that can be used + instead os static IP based discovery. + --> + <!-- Uncomment static IP finder to enable static-based discovery of initial nodes. --> + <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</value> + </list> + </property> + </bean> + </property> + <property name="socketTimeout" value="300" /> + </bean> + </property> + </bean> +</beans> http://git-wip-us.apache.org/repos/asf/ignite/blob/ed658597/modules/platforms/cpp/thin-client-test/config/ssl.xml ---------------------------------------------------------------------- diff --git a/modules/platforms/cpp/thin-client-test/config/ssl.xml b/modules/platforms/cpp/thin-client-test/config/ssl.xml new file mode 100644 index 0000000..2b56064 --- /dev/null +++ b/modules/platforms/cpp/thin-client-test/config/ssl.xml @@ -0,0 +1,31 @@ +<?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"> + + <import resource="ssl-default.xml"/> + + <bean parent="test.cfg"/> + +</beans> http://git-wip-us.apache.org/repos/asf/ignite/blob/ed658597/modules/platforms/cpp/thin-client-test/config/ssl/ca.pem ---------------------------------------------------------------------- diff --git a/modules/platforms/cpp/thin-client-test/config/ssl/ca.pem b/modules/platforms/cpp/thin-client-test/config/ssl/ca.pem new file mode 100644 index 0000000..10bf7af --- /dev/null +++ b/modules/platforms/cpp/thin-client-test/config/ssl/ca.pem @@ -0,0 +1,24 @@ +-----BEGIN TRUSTED CERTIFICATE----- +MIID8DCCAtgCCQCo436SJYMUcjANBgkqhkiG9w0BAQsFADCBuTELMAkGA1UEBhMC +UlUxGTAXBgNVBAgMEFNhaW50LVBldGVyc2J1cmcxGTAXBgNVBAcMEFNhaW50LVBl +dGVyc2J1cmcxIzAhBgNVBAoMGkFwYWNoZSBTcGZ0d2FyZSBGb3VuZGF0aW9uMRYw +FAYDVQQLDA1BcGFjaGUgSWduaXRlMRQwEgYDVQQDDAtJZ29yIFNhcGVnbzEhMB8G +CSqGSIb3DQEJARYSaXNhcGVnb0BhcGFjaGUub3JnMB4XDTE3MTEyODE3MzExNloX +DTI3MTEyNjE3MzExNlowgbkxCzAJBgNVBAYTAlJVMRkwFwYDVQQIDBBTYWludC1Q +ZXRlcnNidXJnMRkwFwYDVQQHDBBTYWludC1QZXRlcnNidXJnMSMwIQYDVQQKDBpB +cGFjaGUgU3BmdHdhcmUgRm91bmRhdGlvbjEWMBQGA1UECwwNQXBhY2hlIElnbml0 +ZTEUMBIGA1UEAwwLSWdvciBTYXBlZ28xITAfBgkqhkiG9w0BCQEWEmlzYXBlZ29A +YXBhY2hlLm9yZzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALMcDfYN +Ixc0o4bLX/3T5MQE4pk+Bv9Dfr7vBYNPJKSr/GKQJN+5QA/tr1uxTsMSBoE19y5e +N1vXFtlWMJ2um3ojNbGeqSGuzuDKk0htbgmisyctvEFTqtiYI7D+f7dalEM2KnLj +f0jIV6NJVilkFKmgsfuZpbZFRkqJDEx74ZqNAYQQ0qJ+zGv7diEak8FwWa4n6xe7 +VHt7VZIbKIkMgTljJLULbExxCRvTHpSeXPP5IMr5x1RGuSavCu4GDl+HmrXac7ot +L7sqIFHL9JGXTWO16accOQnQIdLQmhj6qh2Em8z41udabzUyIQmOSP6mmwnJEIdz +jNyWLA8XtYZOgcsCAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAT6jBgiQjCdQ02cxe +H9YDFw5+cfb6YQJcjJW94BspySftUGfJ6GQm/Ybcc/ZqW7lhEILKfifdpHPfWby/ +sqhwA0nsLt5hNCjMsDcBq5onggy9ymZYak0VVWT/XkHiK27sQLK6BXo6wqRDwT4h +F9CgUWNcLGDVAaVpjLaR8itZZgx98q9MAZ680oERUZWTsj17oO0RK/x9TBWUm7OR +f9g9VNRz3mwT5dTtuqrSq4NlF1nVD7BN3lRddZUW4KnU6et2mXtIKMnUT/+XyIW3 +g+f6LuhR+Q6yhmVdfBVa8opJQIR5trb0eKnQf4pEQcvT/EX+vWkThNJkdZ4qm0mY +eIl/jQ== +-----END TRUSTED CERTIFICATE----- http://git-wip-us.apache.org/repos/asf/ignite/blob/ed658597/modules/platforms/cpp/thin-client-test/config/ssl/client_full.pem ---------------------------------------------------------------------- diff --git a/modules/platforms/cpp/thin-client-test/config/ssl/client_full.pem b/modules/platforms/cpp/thin-client-test/config/ssl/client_full.pem new file mode 100644 index 0000000..9a54f43 --- /dev/null +++ b/modules/platforms/cpp/thin-client-test/config/ssl/client_full.pem @@ -0,0 +1,84 @@ +Bag Attributes + friendlyName: client + localKeyID: 54 69 6D 65 20 31 35 31 31 39 36 35 31 38 31 32 33 37 +Key Attributes: <No Attributes> +-----BEGIN RSA PRIVATE KEY----- +MIIEowIBAAKCAQEAmm+QSwc1yvJWjTG8L4rAiHOg38rM1AtOFInzYizT/B6wzsmx +3Ql4fb+aHm3dPt5kjhQLZToq1QCUsS9B/47ZFd0waDHGgLiSNKn1WdX7Q+4GgplY +wznc5j+GM65F2aI3tRnn2Jorfss9OElzU5vLh0aD3e5cEpgYSAGEFl1O9t8b6dHq +YMERtdTCNQVeBUQPiaNNTwOXixtdsPvGKNgMZtVpvV+AMlgVmV+VTYUqQhlX+ro4 +9E4n00+iDIk/REwAiQi/Kb08kovLY9sF2pqC24zU5swyIopEijoa6Z2WYekq1fyL +P9NknOiMOmWaKqu5ThVbP6c2xGeCdAGbNi+74wIDAQABAoIBAH2oALPLbg1vGNVR +flkAgJ+F1YPBst9lQ2aayBk9eE5PenUGz12V8x/94hyYL8iTkyW3UX5P0cH18wYn ++X9Cb4fGrThaJ7VceDm5gBRUc1lWNp3Uv9A5KG9/iGZMijEGOGV2appm9rT4ERvX +R6rjvLqYuXq+EtReRINyGFNKIJHkuwM7Ycy9Rk7O6SrcjjUEj1Z5gEUP0B7Z0jVI +bsOGqghRflRVqnFT61+koFWBn8taemWmXNa835beN2lRIWezNqfd+9kL72UUt6sl +VmkqBydDQ+IXCOgLZDYUu3N0bfrKuYmilsRg9XuKTUv+jvwtfGUWTO1+6eSrFD+B +3j0YeKECgYEA0XrsUOGVl2O4JWBOa36TRHMz0tRBrZUJMK7apEEiGx7jc7q22PI+ +RyPrf9TR7JOLN1AdXoHrJsKCadnTr6g/CAOZSV1V+lUeQkcDmG4OkY814fESxlBA +jHg7FnJdjzs6VfA1Cv0eT2KxU0ld461AN77WBgG21E2Gw3AGSddbflcCgYEAvLtV +fhy3+WOUutFsLv1uTz/y+Emih6pmgwsuRG7WgQD9s2KZS+ejh5TQAq4sD+9MSkKk +XnvdbwGQkHppdtVP5wMeSfY6tG/9YmY7X5rTG9PTsrzAzNJwrnE9hFv7Xnj3SMnC +0D9eBnA8XWq49vsair7gxBWwhGYR/5WDicGn31UCgYEAgJb6lbPEhkgadCcoPGhY +sn4dY+AT6SBBofbUFFw/OXK+oP4O3CHoBPeRysizjIwNu4icXrVVyldAgwXKIlwf +RSYgZJ689oxlpL2/AUUeAFBu/SFlKwN8fD4Z12+g6xmqd7KafQJgJs8olz3EOszR +TOcCrnFC8BQfE72ivpVKfsUCgYBBZw3maR9cHiUxZFeAJTTv47JYVnQrXWKu8NX0 +wxA0nlpMqtOC2V/zIR/Afgko8H1YkqWRVI1U5Y7qcnFPy/YnkQ4TBXAsjU6apeDX +bbjQwORw4TZTBG4mFXoC/zkp8POI1tpa/kqgIo7YtJ4qgLQe9qy/ZuDH0PNVxcNS +nriFDQKBgF70vrmuYEobLpBD/whcOqMDjn3Zj+xx3TSRmjmjc4w5eRR4+9iquKs5 +lhY1NsAcq3SYA8P5rNDV39FpiPErFqDTjsf0AaOXbpaqo2jOANmvyT15CKW8325R +yEcxaA8sSbBaz8QRkydzpoKT+4WFJnYzCZtG+kUU+Pgu6uahAs4N +-----END RSA PRIVATE KEY----- +Bag Attributes + friendlyName: client + localKeyID: 54 69 6D 65 20 31 35 31 31 39 36 35 31 38 31 32 33 37 +subject=/CN=ODBC +issuer=/C=RU/ST=Saint-Petersburg/L=Saint-Petersburg/O=Apache Spftware Foundation/OU=Apache Ignite/CN=Igor Sapego/[email protected] +-----BEGIN CERTIFICATE----- +MIIDPTCCAiUCAQIwDQYJKoZIhvcNAQEFBQAwgbkxCzAJBgNVBAYTAlJVMRkwFwYD +VQQIDBBTYWludC1QZXRlcnNidXJnMRkwFwYDVQQHDBBTYWludC1QZXRlcnNidXJn +MSMwIQYDVQQKDBpBcGFjaGUgU3BmdHdhcmUgRm91bmRhdGlvbjEWMBQGA1UECwwN +QXBhY2hlIElnbml0ZTEUMBIGA1UEAwwLSWdvciBTYXBlZ28xITAfBgkqhkiG9w0B +CQEWEmlzYXBlZ29AYXBhY2hlLm9yZzAeFw0xNzExMjkxNDAwNDhaFw0yNzExMjcx +NDAwNDhaMA8xDTALBgNVBAMTBE9EQkMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw +ggEKAoIBAQCab5BLBzXK8laNMbwvisCIc6DfyszUC04UifNiLNP8HrDOybHdCXh9 +v5oebd0+3mSOFAtlOirVAJSxL0H/jtkV3TBoMcaAuJI0qfVZ1ftD7gaCmVjDOdzm +P4YzrkXZoje1GefYmit+yz04SXNTm8uHRoPd7lwSmBhIAYQWXU723xvp0epgwRG1 +1MI1BV4FRA+Jo01PA5eLG12w+8Yo2Axm1Wm9X4AyWBWZX5VNhSpCGVf6ujj0TifT +T6IMiT9ETACJCL8pvTySi8tj2wXamoLbjNTmzDIiikSKOhrpnZZh6SrV/Is/02Sc +6Iw6ZZoqq7lOFVs/pzbEZ4J0AZs2L7vjAgMBAAEwDQYJKoZIhvcNAQEFBQADggEB +AH8heMPYkC/abqg9xtC5WFgYxnXWA6jwjKVuCSnrEhZGQem9HFvFXmZckJr25RXc +9i8WIehN5oeJgmPioK6j8ylwCJxo9lRii4NFBVpS6IjmqMdYHa+4K1R9Y7XdDEBL +nVzlL8Hjlv4ESjg+1LW4nSt8f4oBdAvfds4uNTtAwABqmfqXWaOKYdh9OJs84QJa +pA4PQvxqUz6c4tyPi/VucVAV8uKxR7P+uoy6qKKZK6NkY3RuXwHXxJ5lDr6ET1mb +St0BbAt4KSktPonCu0qoHWqcynw79KcoPhmQWpzbijVs+y/SlHmZje+H4R7j7xt7 +aw7dWxUa096x4vsi1WvlMOY= +-----END CERTIFICATE----- +Bag Attributes + friendlyName: 1.2.840.113549.1.9.1=#16126973617065676f406170616368652e6f7267,CN=Igor Sapego,OU=Apache Ignite,O=Apache Spftware Foundation,L=Saint-Petersburg,ST=Saint-Petersburg,C=RU +subject=/C=RU/ST=Saint-Petersburg/L=Saint-Petersburg/O=Apache Spftware Foundation/OU=Apache Ignite/CN=Igor Sapego/[email protected] +issuer=/C=RU/ST=Saint-Petersburg/L=Saint-Petersburg/O=Apache Spftware Foundation/OU=Apache Ignite/CN=Igor Sapego/[email protected] +-----BEGIN CERTIFICATE----- +MIID8DCCAtgCCQCo436SJYMUcjANBgkqhkiG9w0BAQsFADCBuTELMAkGA1UEBhMC +UlUxGTAXBgNVBAgMEFNhaW50LVBldGVyc2J1cmcxGTAXBgNVBAcMEFNhaW50LVBl +dGVyc2J1cmcxIzAhBgNVBAoMGkFwYWNoZSBTcGZ0d2FyZSBGb3VuZGF0aW9uMRYw +FAYDVQQLDA1BcGFjaGUgSWduaXRlMRQwEgYDVQQDDAtJZ29yIFNhcGVnbzEhMB8G +CSqGSIb3DQEJARYSaXNhcGVnb0BhcGFjaGUub3JnMB4XDTE3MTEyODE3MzExNloX +DTI3MTEyNjE3MzExNlowgbkxCzAJBgNVBAYTAlJVMRkwFwYDVQQIDBBTYWludC1Q +ZXRlcnNidXJnMRkwFwYDVQQHDBBTYWludC1QZXRlcnNidXJnMSMwIQYDVQQKDBpB +cGFjaGUgU3BmdHdhcmUgRm91bmRhdGlvbjEWMBQGA1UECwwNQXBhY2hlIElnbml0 +ZTEUMBIGA1UEAwwLSWdvciBTYXBlZ28xITAfBgkqhkiG9w0BCQEWEmlzYXBlZ29A +YXBhY2hlLm9yZzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALMcDfYN +Ixc0o4bLX/3T5MQE4pk+Bv9Dfr7vBYNPJKSr/GKQJN+5QA/tr1uxTsMSBoE19y5e +N1vXFtlWMJ2um3ojNbGeqSGuzuDKk0htbgmisyctvEFTqtiYI7D+f7dalEM2KnLj +f0jIV6NJVilkFKmgsfuZpbZFRkqJDEx74ZqNAYQQ0qJ+zGv7diEak8FwWa4n6xe7 +VHt7VZIbKIkMgTljJLULbExxCRvTHpSeXPP5IMr5x1RGuSavCu4GDl+HmrXac7ot +L7sqIFHL9JGXTWO16accOQnQIdLQmhj6qh2Em8z41udabzUyIQmOSP6mmwnJEIdz +jNyWLA8XtYZOgcsCAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAT6jBgiQjCdQ02cxe +H9YDFw5+cfb6YQJcjJW94BspySftUGfJ6GQm/Ybcc/ZqW7lhEILKfifdpHPfWby/ +sqhwA0nsLt5hNCjMsDcBq5onggy9ymZYak0VVWT/XkHiK27sQLK6BXo6wqRDwT4h +F9CgUWNcLGDVAaVpjLaR8itZZgx98q9MAZ680oERUZWTsj17oO0RK/x9TBWUm7OR +f9g9VNRz3mwT5dTtuqrSq4NlF1nVD7BN3lRddZUW4KnU6et2mXtIKMnUT/+XyIW3 +g+f6LuhR+Q6yhmVdfBVa8opJQIR5trb0eKnQf4pEQcvT/EX+vWkThNJkdZ4qm0mY +eIl/jQ== +-----END CERTIFICATE----- http://git-wip-us.apache.org/repos/asf/ignite/blob/ed658597/modules/platforms/cpp/thin-client-test/config/ssl/client_unknown.pem ---------------------------------------------------------------------- diff --git a/modules/platforms/cpp/thin-client-test/config/ssl/client_unknown.pem b/modules/platforms/cpp/thin-client-test/config/ssl/client_unknown.pem new file mode 100644 index 0000000..b9a8e43 --- /dev/null +++ b/modules/platforms/cpp/thin-client-test/config/ssl/client_unknown.pem @@ -0,0 +1,50 @@ +-----BEGIN PRIVATE KEY----- +MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQC0HaDP3KkkgcT7 +3FWWxXEgiT5vAsW+ZByiWg5Yh5XtU7rAjiXT9VmOm1h/5GNdngF7ofhT+qal1k8W +yiLsbqWL6qYXkc0e8aKw9ciBaWDWDkgXNnV03butu70hNvm/fzYp/6/WQ5SXUJdm +mJZyeVjgU4NXnOe0lv2PlzUr5q1yjJCSnTbsHBvs0qfoy7DYqPQFbrwiuIOeYtVg +mjjL/y6SUCY/uNY8McLG0YFubNsnOCEIyZOgAM1RdmARt+iYZuLVZkicgkaxYtLB +pbUB8K2Y/A+0WjL7JceZVWbUaQKkDncegccMmHzEOBsJyLRWu+/5ztan7xh+jIGd +vtlgoz8/AgMBAAECggEBAKx4TnucHW7ywFA3/NEBwUDZiqo8KmQUcwLXXzNQqbT2 +3zXxJ7HeF2KhyE22wZtsaJkdULABrL/SBiuZZXWmwejHyUF6gMMnuJTg1Z1t7acr +R8bKhBBjHorO4dzDSsUfKBtxVcvDLK70IfXBGRcGsZ8k+PjVK15W0vhDX0vpeJ7c +9E6FS+Kfz31d8/xLETF3QdevfPTTMliakL0Tr37NKefdGXU8O07tvL/Chq40VWzl +KqdU0ti+mI18fNsTgpe16JLvEpQBQ1ZRm/ip5ZJPkPloZn7sP7KIpmZOuMplbYlJ +ZyINe+OKOLB8/65XK8eqwgEyQQi9Iq7/2bWgMbZKP8ECgYEA54ysuNUEVtwhmcXK +CGiTfuCqguvKmaFraenoCxvf+aY3TU7dguA8soI+yQraqt9nW1fqrMEOnzr/mEFI +3NE81k3uWLPdcbk/sPKKI2iQqkmlCR7XQYch0Kq2KZ3A4kXvT0M6njBb/8UFtSai +dWiit9/9c40PGUA28+dYCSnnn2ECgYEAxyKT/+hrCHauj7Enz2jqIBsIJGRq6bc0 +rZZf4yoQO4wJTs7zTUa3REYHQOGYM/zb6BkmO5SaHiUxwrAvWi+3UvSwzSC7SZEw +2Ym8FRFZLcjG2n9CeHK4jcp8kXnoeoKnD9K9ztQszmjl+YJ5LLAXEQuXlwG0ZSld +Nz2OHuHYgp8CgYEAnrJequtsZu/Go7LYzjyGYp4unz5mBDeK+/NRk1OOhXczTevw +i8OONjZoO7gRuK0XFJbEA5TppZ51EXAlNRq/HI4a/naAHnJ9wZPps2z2QY/p6b9W +ftXUCkUGRq2VRj/yTZvhMAwq8biiOc7554hIhceh2TFjmMXXJAF56AXtduECgYA6 +Y1kh3/QCN0pXt4oEtq5vW323rfnrLVy0yTK0WNEJpLXV9bhBIEr8KcxWqc8G701L +cJRVQ+0siZtdimtX9kW6fSSaAM7pczjvkAMl6kBLvGMSDd5fksOqT4TW4vfXdBen +/BLLYksA+qDz193PzJH23X9FN6q9PrOmTtYtF+tz4QKBgQDeUhgpylS0sjTzS36b +8V86DJ4mj22B7H6jp826Y696V79a2/jSacs1KKExOYXeJBUdhDoutVS0PiT10br9 +lSIKiExbrddmBUd5OEtZKz1bXqRoMZlAvjuOhqadU0DciSQjiZ8CSmSzCX31++7G +velIMG6xcMV3LKtY4dr7B6KuiA== +-----END PRIVATE KEY----- +-----BEGIN CERTIFICATE----- +MIIDoTCCAomgAwIBAgIJAJy64S/DycmkMA0GCSqGSIb3DQEBCwUAMGcxCzAJBgNV +BAYTAlJVMRkwFwYDVQQIDBBTYWludCBQZXRlcnNidXJnMRkwFwYDVQQHDBBTYWlu +dCBQZXRlcnNidXJnMRAwDgYDVQQKDAdVbmtub3duMRAwDgYDVQQDDAdVbmtub3du +MB4XDTE4MDEyNDEwMTUwNFoXDTE5MDEyNDEwMTUwNFowZzELMAkGA1UEBhMCUlUx +GTAXBgNVBAgMEFNhaW50IFBldGVyc2J1cmcxGTAXBgNVBAcMEFNhaW50IFBldGVy +c2J1cmcxEDAOBgNVBAoMB1Vua25vd24xEDAOBgNVBAMMB1Vua25vd24wggEiMA0G +CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC0HaDP3KkkgcT73FWWxXEgiT5vAsW+ +ZByiWg5Yh5XtU7rAjiXT9VmOm1h/5GNdngF7ofhT+qal1k8WyiLsbqWL6qYXkc0e +8aKw9ciBaWDWDkgXNnV03butu70hNvm/fzYp/6/WQ5SXUJdmmJZyeVjgU4NXnOe0 +lv2PlzUr5q1yjJCSnTbsHBvs0qfoy7DYqPQFbrwiuIOeYtVgmjjL/y6SUCY/uNY8 +McLG0YFubNsnOCEIyZOgAM1RdmARt+iYZuLVZkicgkaxYtLBpbUB8K2Y/A+0WjL7 +JceZVWbUaQKkDncegccMmHzEOBsJyLRWu+/5ztan7xh+jIGdvtlgoz8/AgMBAAGj +UDBOMB0GA1UdDgQWBBSmehz8ReTNQ6IQmMBXhns97I3U6jAfBgNVHSMEGDAWgBSm +ehz8ReTNQ6IQmMBXhns97I3U6jAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUA +A4IBAQAjtzZtXSqIrWJfCJCp0Kal/swR9EDIhvdZNpH3VJMUKENRPKZF2AdlGLwx +sSAL6oUkCjew3NC4UM7CH1LZR+RZOQXhLxh+xmlIUDJukjftPcEAXAymCJyEShjD +qr/YH3SrrVfzf/ViZOa3YrlWXuP9WqEYYAMJcNmgl2A1vhpIwrF0+GLrvnUV2E6a +qHqBmA8GforiiOye+TQKNuFCgd+m8nr3AUCBaY2aVgFBg5Z2uumMzx5qmejQIdDr +tiKsr7+QiaY97lXIThMCDxPt63Jk2uO9yUJZSzDJlY2JHuRnMmyO+TnVrUAyCr60 +dBkPpbvH/kMPPFkOhDk6e40YvqWY +-----END CERTIFICATE----- http://git-wip-us.apache.org/repos/asf/ignite/blob/ed658597/modules/platforms/cpp/thin-client-test/config/ssl/server.jks ---------------------------------------------------------------------- diff --git a/modules/platforms/cpp/thin-client-test/config/ssl/server.jks b/modules/platforms/cpp/thin-client-test/config/ssl/server.jks new file mode 100644 index 0000000..2632662 Binary files /dev/null and b/modules/platforms/cpp/thin-client-test/config/ssl/server.jks differ http://git-wip-us.apache.org/repos/asf/ignite/blob/ed658597/modules/platforms/cpp/thin-client-test/config/ssl/trust.jks ---------------------------------------------------------------------- diff --git a/modules/platforms/cpp/thin-client-test/config/ssl/trust.jks b/modules/platforms/cpp/thin-client-test/config/ssl/trust.jks new file mode 100644 index 0000000..a0f3bcf Binary files /dev/null and b/modules/platforms/cpp/thin-client-test/config/ssl/trust.jks differ http://git-wip-us.apache.org/repos/asf/ignite/blob/ed658597/modules/platforms/cpp/thin-client-test/configure.ac ---------------------------------------------------------------------- diff --git a/modules/platforms/cpp/thin-client-test/configure.ac b/modules/platforms/cpp/thin-client-test/configure.ac new file mode 100644 index 0000000..61aa503 --- /dev/null +++ b/modules/platforms/cpp/thin-client-test/configure.ac @@ -0,0 +1,62 @@ +# +# 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. +# + +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_PREREQ([2.69]) +AC_INIT([Apache Ignite C++ Thin Client Test], [2.5.0.26265], [[email protected]], [ignite], [ignite.apache.org]) +AC_CONFIG_SRCDIR(src) + +AC_CANONICAL_SYSTEM +AC_CONFIG_MACRO_DIR([m4]) +AC_LANG([C++]) + +# Initialize automake +AM_INIT_AUTOMAKE([-Wall foreign subdir-objects]) +AC_CONFIG_HEADER(config.h) + +AM_PROG_AR + +# Checks for programs. +GXX="-g -O2" + +AC_PROG_CXX + +# Initialize Libtool +LT_INIT + +# Checks for libraries. +AC_CHECK_LIB([pthread], [pthread_mutex_lock]) + +# Checks for header files. + +# Checks for typedefs, structures, and compiler characteristics. +AC_C_INLINE +AC_TYPE_INT16_T +AC_TYPE_INT32_T +AC_TYPE_INT64_T +AC_TYPE_INT8_T +AC_TYPE_PID_T +AC_TYPE_SIZE_T + +# Checks for library functions. +AC_FUNC_ERROR_AT_LINE + +AC_CONFIG_FILES(Makefile include/Makefile) + +AC_OUTPUT http://git-wip-us.apache.org/repos/asf/ignite/blob/ed658597/modules/platforms/cpp/thin-client-test/include/Makefile.am ---------------------------------------------------------------------- diff --git a/modules/platforms/cpp/thin-client-test/include/Makefile.am b/modules/platforms/cpp/thin-client-test/include/Makefile.am new file mode 100644 index 0000000..46a1825 --- /dev/null +++ b/modules/platforms/cpp/thin-client-test/include/Makefile.am @@ -0,0 +1,24 @@ +## +## 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. +## + +ACLOCAL_AMFLAGS =-I m4 + +noinst_HEADERS = \ + teamcity/teamcity_messages.h \ + ignite/complex_type.h \ + test_utils.h + http://git-wip-us.apache.org/repos/asf/ignite/blob/ed658597/modules/platforms/cpp/thin-client-test/include/ignite/complex_type.h ---------------------------------------------------------------------- diff --git a/modules/platforms/cpp/thin-client-test/include/ignite/complex_type.h b/modules/platforms/cpp/thin-client-test/include/ignite/complex_type.h new file mode 100644 index 0000000..6bd0b7f --- /dev/null +++ b/modules/platforms/cpp/thin-client-test/include/ignite/complex_type.h @@ -0,0 +1,123 @@ +/* + * 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. + */ + +#ifndef _IGNITE_ODBC_TEST_COMPLEX_TYPE +#define _IGNITE_ODBC_TEST_COMPLEX_TYPE + +#include <stdint.h> +#include <string> + +namespace ignite +{ + struct InnerObject + { + InnerObject() : + f1(412), + f2("Lorem ipsum") + { + // No-op. + } + + friend bool operator==(const InnerObject& one, const InnerObject& two) + { + return one.f1 == two.f1 && + one.f2 == two.f2; + } + + int32_t f1; + std::string f2; + }; + + struct ComplexType + { + ComplexType() : + i32Field(0) + { + // No-op. + } + + friend bool operator==(const ComplexType& one, const ComplexType& two) + { + return one.i32Field == two.i32Field && + one.objField == two.objField && + one.strField == two.strField; + } + + int32_t i32Field; + InnerObject objField; + std::string strField; + }; +} + +namespace ignite +{ + namespace binary + { + + IGNITE_BINARY_TYPE_START(ignite::InnerObject) + + typedef ignite::InnerObject InnerObject; + + IGNITE_BINARY_GET_TYPE_ID_AS_HASH(InnerObject) + IGNITE_BINARY_GET_TYPE_NAME_AS_IS(InnerObject) + IGNITE_BINARY_GET_FIELD_ID_AS_HASH + IGNITE_BINARY_IS_NULL_FALSE(InnerObject) + IGNITE_BINARY_GET_NULL_DEFAULT_CTOR(InnerObject) + + static void Write(BinaryWriter& writer, const InnerObject& obj) + { + writer.WriteInt32("f1", obj.f1); + writer.WriteString("f2", obj.f2); + } + + static void Read(BinaryReader& reader, InnerObject& dst) + { + dst.f1 = reader.ReadInt32("f1"); + dst.f2 = reader.ReadString("f2"); + } + + IGNITE_BINARY_TYPE_END + + IGNITE_BINARY_TYPE_START(ignite::ComplexType) + + typedef ignite::ComplexType ComplexType; + + IGNITE_BINARY_GET_TYPE_ID_AS_HASH(ComplexType) + IGNITE_BINARY_GET_TYPE_NAME_AS_IS(ComplexType) + IGNITE_BINARY_GET_FIELD_ID_AS_HASH + IGNITE_BINARY_IS_NULL_FALSE(ComplexType) + IGNITE_BINARY_GET_NULL_DEFAULT_CTOR(ComplexType) + + static void Write(BinaryWriter& writer, const ComplexType& obj) + { + writer.WriteInt32("i32Field", obj.i32Field); + writer.WriteObject("objField", obj.objField); + writer.WriteString("strField", obj.strField); + } + + static void Read(BinaryReader& reader, ComplexType& dst) + { + dst.i32Field = reader.ReadInt32("i32Field"); + dst.objField = reader.ReadObject<InnerObject>("objField"); + dst.strField = reader.ReadString("strField"); + } + + IGNITE_BINARY_TYPE_END + } +}; + +#endif // _IGNITE_ODBC_TEST_COMPLEX_TYPE http://git-wip-us.apache.org/repos/asf/ignite/blob/ed658597/modules/platforms/cpp/thin-client-test/include/teamcity/teamcity_messages.h ---------------------------------------------------------------------- diff --git a/modules/platforms/cpp/thin-client-test/include/teamcity/teamcity_messages.h b/modules/platforms/cpp/thin-client-test/include/teamcity/teamcity_messages.h new file mode 100644 index 0000000..81a915b --- /dev/null +++ b/modules/platforms/cpp/thin-client-test/include/teamcity/teamcity_messages.h @@ -0,0 +1,55 @@ +/* Copyright 2011 JetBrains s.r.o. + * + * Licensed 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. + * + * $Revision: 88625 $ +*/ + +#ifndef H_TEAMCITY_MESSAGES +#define H_TEAMCITY_MESSAGES + +#include <string> +#include <iostream> + +namespace JetBrains { + +std::string getFlowIdFromEnvironment(); +bool underTeamcity(); + +class TeamcityMessages { + std::ostream *m_out; + +protected: + std::string escape(std::string s); + + void openMsg(const std::string &name); + void writeProperty(std::string name, std::string value); + void closeMsg(); + +public: + TeamcityMessages(); + + void setOutput(std::ostream &); + + void suiteStarted(std::string name, std::string flowid = ""); + void suiteFinished(std::string name, std::string flowid = ""); + + void testStarted(std::string name, std::string flowid = ""); + void testFailed(std::string name, std::string message, std::string details, std::string flowid = ""); + void testIgnored(std::string name, std::string message, std::string flowid = ""); + void testFinished(std::string name, int durationMs = -1, std::string flowid = ""); +}; + +} + +#endif /* H_TEAMCITY_MESSAGES */ http://git-wip-us.apache.org/repos/asf/ignite/blob/ed658597/modules/platforms/cpp/thin-client-test/include/test_utils.h ---------------------------------------------------------------------- diff --git a/modules/platforms/cpp/thin-client-test/include/test_utils.h b/modules/platforms/cpp/thin-client-test/include/test_utils.h new file mode 100644 index 0000000..653e7da --- /dev/null +++ b/modules/platforms/cpp/thin-client-test/include/test_utils.h @@ -0,0 +1,72 @@ +/* + * 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. + */ + +#ifndef _IGNITE_THIN_CLIENT_TEST_TEST_UTILS +#define _IGNITE_THIN_CLIENT_TEST_TEST_UTILS + +#include <string> + +#include <ignite/ignition.h> + +namespace ignite_test +{ + /** + * @return Test config directory path. + */ + std::string GetTestConfigDir(); + + /** + * Initialize configuration for a node. + * + * Inits Ignite node configuration from specified config file. + * Config file is searched in path specified by IGNITE_NATIVE_TEST_CPP_THIN_CONFIG_PATH + * environmental variable. + * + * @param cfg Ignite config. + * @param cfgFile Ignite node config file name without path. + */ + void InitConfig(ignite::IgniteConfiguration& cfg, const char* cfgFile); + + /** + * Start Ignite node. + * + * Starts new Ignite node with the specified name and from specified config file. + * Config file is searched in path specified by IGNITE_NATIVE_TEST_CPP_THIN_CONFIG_PATH + * environmental variable. + * + * @param cfgFile Ignite node config file name without path. + * @param name Node name. + * @return New node. + */ + ignite::Ignite StartServerNode(const char* cfgFile, const char* name); + + /** + * Start Ignite node with config path corrected for specific platform. + * + * @param cfgFile Ignite node config file name without path. + * @param name Node name. + * @return New node. + */ + ignite::Ignite StartCrossPlatformServerNode(const char* cfgFile, const char* name); + + /** + * Remove all the LFS artifacts. + */ + void ClearLfs(); +} + +#endif // _IGNITE_THIN_CLIENT_TEST_TEST_UTILS \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/ed658597/modules/platforms/cpp/thin-client-test/project/vs/thin-client-test.vcxproj ---------------------------------------------------------------------- diff --git a/modules/platforms/cpp/thin-client-test/project/vs/thin-client-test.vcxproj b/modules/platforms/cpp/thin-client-test/project/vs/thin-client-test.vcxproj new file mode 100644 index 0000000..5d5729f --- /dev/null +++ b/modules/platforms/cpp/thin-client-test/project/vs/thin-client-test.vcxproj @@ -0,0 +1,186 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <ItemGroup> + <ClCompile Include="..\..\src\auth_test.cpp" /> + <ClCompile Include="..\..\src\cache_client_test.cpp" /> + <ClCompile Include="..\..\src\ignite_client_test.cpp" /> + <ClCompile Include="..\..\src\ssl_test.cpp" /> + <ClCompile Include="..\..\src\teamcity\teamcity_boost.cpp" /> + <ClCompile Include="..\..\src\teamcity\teamcity_messages.cpp" /> + <ClCompile Include="..\..\src\test_utils.cpp" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\..\include\ignite\complex_type.h" /> + <ClInclude Include="..\..\include\teamcity\teamcity_messages.h" /> + <ClInclude Include="..\..\include\test_utils.h" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\..\binary\project\vs\binary.vcxproj"> + <Project>{4f15669b-92eb-49f0-b774-8f19bae0b960}</Project> + </ProjectReference> + <ProjectReference Include="..\..\..\common\project\vs\common.vcxproj"> + <Project>{b63f2e01-5157-4719-8491-0e1c7cd3b701}</Project> + </ProjectReference> + <ProjectReference Include="..\..\..\core\project\vs\core.vcxproj"> + <Project>{e2dea693-f2ea-43c2-a813-053378f6e4db}</Project> + </ProjectReference> + <ProjectReference Include="..\..\..\jni\project\vs\jni.vcxproj"> + <Project>{4f7e4917-4612-4b96-9838-025711ade391}</Project> + </ProjectReference> + <ProjectReference Include="..\..\..\thin-client\project\vs\thin-client.vcxproj"> + <Project>{5c037386-b5f5-4a58-9ee2-3d3a508aa866}</Project> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <None Include="..\..\config\auth-32.xml" /> + <None Include="..\..\config\auth-default.xml" /> + <None Include="..\..\config\auth.xml" /> + <None Include="..\..\config\cache-32.xml" /> + <None Include="..\..\config\cache-default.xml" /> + <None Include="..\..\config\cache.xml" /> + <None Include="..\..\config\ssl-32.xml" /> + <None Include="..\..\config\ssl-default.xml" /> + <None Include="..\..\config\ssl.xml" /> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{5662F10A-9C40-45D6-AFF8-E93573FEAABA}</ProjectGuid> + <RootNamespace>thinclienttest</RootNamespace> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v100</PlatformToolset> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v100</PlatformToolset> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <PlatformToolset>v100</PlatformToolset> + <WholeProgramOptimization>true</WholeProgramOptimization> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <PlatformToolset>v100</PlatformToolset> + <WholeProgramOptimization>true</WholeProgramOptimization> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir> + <IntDir>$(Platform)\$(Configuration)\</IntDir> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir> + <IntDir>$(Platform)\$(Configuration)\</IntDir> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + <SDLCheck>true</SDLCheck> + <AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;$(ProjectDir)\..\..\..\common\include;$(ProjectDir)\..\..\..\common\os\win\include;$(ProjectDir)\..\..\..\jni\include;$(ProjectDir)\..\..\..\jni\os\win\include;$(ProjectDir)\..\..\..\binary\include;$(ProjectDir)\..\..\..\binary\os\win\include;$(ProjectDir)\..\..\..\core\include;$(ProjectDir)\..\..\..\core\os\win\include;$(ProjectDir)\..\..\..\thin-client\include;$(ProjectDir)\..\..\..\thin-client\os\win\include;$(ProjectDir)\..\..\include;$(BOOST_HOME)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_DEBUG;IGNITE_IMPL;BOOST_DATE_TIME_NO_LIB;BOOST_REGEX_NO_LIB;_CRT_SECURE_NO_WARNINGS;IGNITE_FRIEND;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <ExceptionHandling>Async</ExceptionHandling> + </ClCompile> + <Link> + <GenerateDebugInformation>true</GenerateDebugInformation> + <AdditionalDependencies>$(BOOST_HOME)\lib64-msvc-10.0\libboost_unit_test_framework-vc100-mt-gd-1_58.lib;$(BOOST_HOME)\lib64-msvc-10.0\libboost_thread-vc100-mt-gd-1_58.lib;$(BOOST_HOME)\lib64-msvc-10.0\libboost_system-vc100-mt-gd-1_58.lib;$(BOOST_HOME)\lib64-msvc-10.0\libboost_chrono-vc100-mt-gd-1_58.lib;%(AdditionalDependencies)</AdditionalDependencies> + <SubSystem>Console</SubSystem> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + <SDLCheck>true</SDLCheck> + <AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;$(ProjectDir)\..\..\..\common\include;$(ProjectDir)\..\..\..\common\os\win\include;$(ProjectDir)\..\..\..\jni\include;$(ProjectDir)\..\..\..\jni\os\win\include;$(ProjectDir)\..\..\..\binary\include;$(ProjectDir)\..\..\..\binary\os\win\include;$(ProjectDir)\..\..\..\core\include;$(ProjectDir)\..\..\..\core\os\win\include;$(ProjectDir)\..\..\..\thin-client\include;$(ProjectDir)\..\..\..\thin-client\os\win\include;$(ProjectDir)\..\..\include;$(BOOST_HOME)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_DEBUG;IGNITE_IMPL;BOOST_DATE_TIME_NO_LIB;BOOST_REGEX_NO_LIB;_CRT_SECURE_NO_WARNINGS;IGNITE_FRIEND;IGNITE_TESTS_32;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <ExceptionHandling>Async</ExceptionHandling> + </ClCompile> + <Link> + <GenerateDebugInformation>true</GenerateDebugInformation> + <AdditionalDependencies>$(BOOST_HOME)\lib32-msvc-10.0\libboost_unit_test_framework-vc100-mt-gd-1_58.lib;$(BOOST_HOME)\lib32-msvc-10.0\libboost_thread-vc100-mt-gd-1_58.lib;$(BOOST_HOME)\lib32-msvc-10.0\libboost_system-vc100-mt-gd-1_58.lib;$(BOOST_HOME)\lib32-msvc-10.0\libboost_chrono-vc100-mt-gd-1_58.lib;%(AdditionalDependencies)</AdditionalDependencies> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <Optimization>MaxSpeed</Optimization> + <FunctionLevelLinking>true</FunctionLevelLinking> + <IntrinsicFunctions>true</IntrinsicFunctions> + <SDLCheck>true</SDLCheck> + <AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;$(ProjectDir)\..\..\..\common\include;$(ProjectDir)\..\..\..\common\os\win\include;$(ProjectDir)\..\..\..\jni\include;$(ProjectDir)\..\..\..\jni\os\win\include;$(ProjectDir)\..\..\..\binary\include;$(ProjectDir)\..\..\..\binary\os\win\include;$(ProjectDir)\..\..\..\core\include;$(ProjectDir)\..\..\..\core\os\win\include;$(ProjectDir)\..\..\..\thin-client\include;$(ProjectDir)\..\..\..\thin-client\os\win\include;$(ProjectDir)\..\..\include;$(BOOST_HOME)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>NDEBUG;IGNITE_IMPL;BOOST_DATE_TIME_NO_LIB;BOOST_REGEX_NO_LIB;_CRT_SECURE_NO_WARNINGS;IGNITE_FRIEND;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <ExceptionHandling>Async</ExceptionHandling> + </ClCompile> + <Link> + <GenerateDebugInformation>true</GenerateDebugInformation> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + <AdditionalDependencies>$(BOOST_HOME)\lib64-msvc-10.0\libboost_unit_test_framework-vc100-mt-1_58.lib;$(BOOST_HOME)\lib64-msvc-10.0\libboost_thread-vc100-mt-1_58.lib;$(BOOST_HOME)\lib64-msvc-10.0\libboost_system-vc100-mt-1_58.lib;$(BOOST_HOME)\lib64-msvc-10.0\libboost_chrono-vc100-mt-1_58.lib;%(AdditionalDependencies)</AdditionalDependencies> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <Optimization>MaxSpeed</Optimization> + <FunctionLevelLinking>true</FunctionLevelLinking> + <IntrinsicFunctions>true</IntrinsicFunctions> + <SDLCheck>true</SDLCheck> + <AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;$(ProjectDir)\..\..\..\common\include;$(ProjectDir)\..\..\..\common\os\win\include;$(ProjectDir)\..\..\..\jni\include;$(ProjectDir)\..\..\..\jni\os\win\include;$(ProjectDir)\..\..\..\binary\include;$(ProjectDir)\..\..\..\binary\os\win\include;$(ProjectDir)\..\..\..\core\include;$(ProjectDir)\..\..\..\core\os\win\include;$(ProjectDir)\..\..\..\thin-client\include;$(ProjectDir)\..\..\..\thin-client\os\win\include;$(ProjectDir)\..\..\include;$(BOOST_HOME)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>NDEBUG;IGNITE_IMPL;BOOST_DATE_TIME_NO_LIB;BOOST_REGEX_NO_LIB;_CRT_SECURE_NO_WARNINGS;IGNITE_FRIEND;IGNITE_TESTS_32;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <ExceptionHandling>Async</ExceptionHandling> + </ClCompile> + <Link> + <GenerateDebugInformation>true</GenerateDebugInformation> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + <AdditionalDependencies>$(BOOST_HOME)\lib32-msvc-10.0\libboost_unit_test_framework-vc100-mt-1_58.lib;$(BOOST_HOME)\lib32-msvc-10.0\libboost_thread-vc100-mt-1_58.lib;$(BOOST_HOME)\lib32-msvc-10.0\libboost_system-vc100-mt-1_58.lib;$(BOOST_HOME)\lib32-msvc-10.0\libboost_chrono-vc100-mt-1_58.lib;%(AdditionalDependencies)</AdditionalDependencies> + </Link> + </ItemDefinitionGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project> http://git-wip-us.apache.org/repos/asf/ignite/blob/ed658597/modules/platforms/cpp/thin-client-test/project/vs/thin-client-test.vcxproj.filters ---------------------------------------------------------------------- diff --git a/modules/platforms/cpp/thin-client-test/project/vs/thin-client-test.vcxproj.filters b/modules/platforms/cpp/thin-client-test/project/vs/thin-client-test.vcxproj.filters new file mode 100644 index 0000000..e8aee85 --- /dev/null +++ b/modules/platforms/cpp/thin-client-test/project/vs/thin-client-test.vcxproj.filters @@ -0,0 +1,82 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="TeamCity"> + <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> + <Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions> + </Filter> + <Filter Include="Code"> + <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> + <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> + </Filter> + <Filter Include="Configs"> + <UniqueIdentifier>{0ed957ce-09b9-495f-8f11-7ed2b6a98c9b}</UniqueIdentifier> + </Filter> + <Filter Include="Code\Types"> + <UniqueIdentifier>{1a71111d-792b-48d8-b1af-044ebf8cec0e}</UniqueIdentifier> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="..\..\src\ignite_client_test.cpp"> + <Filter>Code</Filter> + </ClCompile> + <ClCompile Include="..\..\src\teamcity\teamcity_boost.cpp"> + <Filter>TeamCity</Filter> + </ClCompile> + <ClCompile Include="..\..\src\teamcity\teamcity_messages.cpp"> + <Filter>TeamCity</Filter> + </ClCompile> + <ClCompile Include="..\..\src\test_utils.cpp"> + <Filter>Code</Filter> + </ClCompile> + <ClCompile Include="..\..\src\ssl_test.cpp"> + <Filter>Code</Filter> + </ClCompile> + <ClCompile Include="..\..\src\auth_test.cpp"> + <Filter>Code</Filter> + </ClCompile> + <ClCompile Include="..\..\src\cache_client_test.cpp"> + <Filter>Code</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\..\include\teamcity\teamcity_messages.h"> + <Filter>TeamCity</Filter> + </ClInclude> + <ClInclude Include="..\..\include\test_utils.h"> + <Filter>Code</Filter> + </ClInclude> + <ClInclude Include="..\..\include\ignite\complex_type.h"> + <Filter>Code\Types</Filter> + </ClInclude> + </ItemGroup> + <ItemGroup> + <None Include="..\..\config\cache.xml"> + <Filter>Configs</Filter> + </None> + <None Include="..\..\config\cache-32.xml"> + <Filter>Configs</Filter> + </None> + <None Include="..\..\config\cache-default.xml"> + <Filter>Configs</Filter> + </None> + <None Include="..\..\config\ssl.xml"> + <Filter>Configs</Filter> + </None> + <None Include="..\..\config\ssl-32.xml"> + <Filter>Configs</Filter> + </None> + <None Include="..\..\config\ssl-default.xml"> + <Filter>Configs</Filter> + </None> + <None Include="..\..\config\auth.xml"> + <Filter>Configs</Filter> + </None> + <None Include="..\..\config\auth-32.xml"> + <Filter>Configs</Filter> + </None> + <None Include="..\..\config\auth-default.xml"> + <Filter>Configs</Filter> + </None> + </ItemGroup> +</Project> http://git-wip-us.apache.org/repos/asf/ignite/blob/ed658597/modules/platforms/cpp/thin-client-test/src/auth_test.cpp ---------------------------------------------------------------------- diff --git a/modules/platforms/cpp/thin-client-test/src/auth_test.cpp b/modules/platforms/cpp/thin-client-test/src/auth_test.cpp new file mode 100644 index 0000000..d241a9d --- /dev/null +++ b/modules/platforms/cpp/thin-client-test/src/auth_test.cpp @@ -0,0 +1,76 @@ +/* + * 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. + */ + +#ifndef _MSC_VER +# define BOOST_TEST_DYN_LINK +#endif + +#include <boost/test/unit_test.hpp> + +#include <ignite/ignition.h> + +#include <ignite/thin/ignite_client_configuration.h> +#include <ignite/thin/ignite_client.h> + +#include <test_utils.h> + +using namespace ignite::thin; +using namespace boost::unit_test; + +class AuthTestSuiteFixture +{ +public: + AuthTestSuiteFixture() + { + ignite_test::ClearLfs(); + + serverNode = ignite_test::StartCrossPlatformServerNode("auth.xml", "ServerNode"); + } + + ~AuthTestSuiteFixture() + { + ignite::Ignition::StopAll(false); + } + +private: + /** Server node. */ + ignite::Ignite serverNode; +}; + +BOOST_FIXTURE_TEST_SUITE(AuthTestSuite, AuthTestSuiteFixture) + +BOOST_AUTO_TEST_CASE(AuthSuccess) +{ + IgniteClientConfiguration cfg; + + cfg.SetEndPoints("127.0.0.1:11110"); + cfg.SetUser("ignite"); + cfg.SetPassword("ignite"); + + IgniteClient::Start(cfg); +} + +BOOST_AUTO_TEST_CASE(AuthReject) +{ + IgniteClientConfiguration cfg; + + cfg.SetEndPoints("127.0.0.1:11110"); + + BOOST_CHECK_THROW(IgniteClient::Start(cfg), ignite::IgniteError); +} + +BOOST_AUTO_TEST_SUITE_END()
