SGF-593 - Refactor failing client/server integration tests due to static port allocation.

(cherry picked from commit 6290d1ee0ccc29d5abda08f06de719343e1201f9)
Signed-off-by: John Blum <jblum@pivotal.io>
This commit is contained in:
John Blum
2017-02-04 22:45:55 -08:00
parent 8357a3b84e
commit 0d096dc140
49 changed files with 1542 additions and 1213 deletions

View File

@@ -1,17 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:gfe="http://www.springframework.org/schema/gemfire"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:util="http://www.springframework.org/schema/util"
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
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/gemfire http://www.springframework.org/schema/gemfire/spring-gemfire.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
">
<gfe:client-cache/>
<context:property-placeholder/>
<util:properties id="gemfireProperties">
<prop key="log-level">warning</prop>
</util:properties>
<gfe:client-cache properties-ref="gemfireProperties"/>
<gfe:pool>
<gfe:server host="localhost" port="54321"/>
<gfe:server host="localhost" port="${spring.data.gemfire.cache.server.port:40404}"/>
</gfe:pool>
<gfe:client-region id="Parent" shortcut="PROXY">

View File

@@ -1,14 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:gfe="http://www.springframework.org/schema/gemfire"
xmlns:util="http://www.springframework.org/schema/util"
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
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/gemfire http://www.springframework.org/schema/gemfire/spring-gemfire.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
">
<context:property-placeholder/>
<util:properties id="gemfireProperties">
<prop key="name">GemFireServerWithRegionForClientConfig</prop>
<prop key="mcast-port">0</prop>
@@ -17,7 +21,7 @@
<gfe:cache properties-ref="gemfireProperties"/>
<gfe:cache-server auto-startup="true" port="54321"/>
<gfe:cache-server auto-startup="true" port="${spring.data.gemfire.cache.server.port:40404}"/>
<gfe:local-region id="localAppDataRegion" name="LocalAppData"/>

View File

@@ -1,16 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:gfe-data="http://www.springframework.org/schema/data/gemfire"
xmlns:repo="http://www.springframework.org/schema/data/repository"
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
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/data/gemfire http://www.springframework.org/schema/data/gemfire/spring-data-gemfire.xsd
http://www.springframework.org/schema/data/repository http://www.springframework.org/schema/data/repository/spring-repository.xsd
" default-lazy-init="true">
<context:property-placeholder/>
<gfe-data:datasource>
<gfe-data:server host="localhost" port="40404"/>
<gfe-data:server host="localhost" port="${spring.data.gemfire.cache.server.port:40404}"/>
</gfe-data:datasource>
<gfe-data:repositories base-package="org.springframework.data.gemfire.repository.sample">

View File

@@ -1,13 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:gfe="http://www.springframework.org/schema/gemfire"
xmlns:util="http://www.springframework.org/schema/util"
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
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/gemfire http://www.springframework.org/schema/gemfire/spring-gemfire.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
" default-lazy-init="true">
">
<context:property-placeholder/>
<util:properties id="gemfireProperties">
<prop key="name">DataSourceServerConfig</prop>
@@ -17,7 +21,7 @@
<gfe:cache properties-ref="gemfireProperties"/>
<gfe:cache-server/>
<gfe:cache-server port="${spring.data.gemfire.cache.server.port:40404}"/>
<gfe:replicated-region id="r1"/>
<gfe:replicated-region id="r2"/>

View File

@@ -1,24 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:gfe="http://www.springframework.org/schema/gemfire"
xmlns:task="http://www.springframework.org/schema/task"
xmlns:util="http://www.springframework.org/schema/util"
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
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/gemfire http://www.springframework.org/schema/gemfire/spring-gemfire.xsd
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
">
<util:properties id="clientCacheConfigurationSettings">
<context:property-placeholder/>
<util:properties id="gemfireProperties">
<prop key="log-level">warning</prop>
</util:properties>
<gfe:client-cache use-bean-factory-locator="false" properties-ref="clientCacheConfigurationSettings" pool-name="clientPool"/>
<gfe:client-cache properties-ref="gemfireProperties" pool-name="clientPool"/>
<gfe:pool id="clientPool" subscription-enabled="true">
<gfe:server host="localhost" port="40404"/>
<gfe:server host="localhost" port="${spring.data.gemfire.cache.server.port:40404}"/>
</gfe:pool>
<bean id="testErrorHandler" class="org.springframework.data.gemfire.listener.StubErrorHandler"/>
@@ -27,8 +31,8 @@
<task:executor id="testTaskExecutor"/>
<gfe:cq-listener-container id="testContainerId" cache="gemfireCache" pool-name="clientPool"
auto-startup="false" phase="4"
error-handler="testErrorHandler" task-executor="testTaskExecutor">
auto-startup="false" error-handler="testErrorHandler" phase="4"
task-executor="testTaskExecutor">
<gfe:listener ref="testQueryListener" query="SELECT * FROM /test-cq" name="Q1"/>
<gfe:listener ref="testQueryListener" query="SELECT * FROM /test-cq" name="Q2" method="handleQuery"/>
<gfe:listener ref="testQueryListener" query="SELECT * FROM /test-cq" name="Q3" durable="true"/>

View File

@@ -13,19 +13,14 @@
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
">
<util:properties id="clientProperties">
<prop key="client.server.host">localhost</prop>
<prop key="client.server.port">12480</prop>
</util:properties>
<context:property-placeholder properties-ref="clientProperties"/>
<context:property-placeholder/>
<util:properties id="gemfireProperties">
<prop key="log-level">config</prop>
<prop key="log-level">warning</prop>
</util:properties>
<gfe:pool id="serverConnectionPool">
<gfe:server host="${client.server.host}" port="${client.server.port}"/>
<gfe:server host="localhost" port="${spring.data.gemfire.cache.server.port:40404}"/>
</gfe:pool>
<bean id="addressPdxSerializer" class="org.springframework.data.gemfire.function.ClientCacheFunctionExecutionWithPdxIntegrationTest$AddressPdxSerializer"/>

View File

@@ -10,14 +10,7 @@
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
">
<util:properties id="serverProperties">
<prop key="server.bind.address">localhost</prop>
<prop key="server.hostname.for.clients">localhost</prop>
<prop key="server.max.connections">2</prop>
<prop key="server.port">12480</prop>
</util:properties>
<context:property-placeholder properties-ref="serverProperties"/>
<context:property-placeholder/>
<util:properties id="gemfireProperties">
<prop key="name">SpringGemFireServerFunctionCreationWithPdx</prop>
@@ -41,8 +34,7 @@
<gfe:cache properties-ref="gemfireProperties" pdx-serializer-ref="domainBasedPdxSerializer"
pdx-read-serialized="true" pdx-ignore-unread-fields="false"/>
<gfe:cache-server auto-startup="true" bind-address="${server.bind.address}" port="${server.port}"
host-name-for-clients="${server.hostname.for.clients}" max-connections="${server.max.connections}"/>
<gfe:cache-server auto-startup="true" max-connections="2" port="${spring.data.gemfire.cache.server.port:40404}"/>
<gfe:annotation-driven/>

View File

@@ -1,24 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:gfe="http://www.springframework.org/schema/gemfire"
xmlns:util="http://www.springframework.org/schema/util"
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
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/gemfire http://www.springframework.org/schema/gemfire/spring-gemfire.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
">
<context:property-placeholder/>
<util:properties id="gemfireProperties">
<prop key="log-level">warning</prop>
<prop key="log-level">error</prop>
</util:properties>
<gfe:pool id="serverBasedPool">
<gfe:server host="localhost" port="15243"/>
</gfe:pool>
<gfe:client-cache properties-ref="gemfireProperties" pool-name="serverBasedPool"/>
<gfe:pool id="serverBasedPool">
<gfe:server host="localhost" port="${spring.data.gemfire.cache.server.port:40404}"/>
</gfe:pool>
<gfe:client-region id="test-region" pool-name="serverBasedPool" shortcut="PROXY"/>
</beans>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:gfe="http://www.springframework.org/schema/gemfire"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:gfe="http://www.springframework.org/schema/gemfire"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
@@ -11,16 +11,18 @@
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
">
<context:property-placeholder/>
<util:properties id="gemfireProperties">
<prop key="name">FunctionIntegrationTestsServerContext</prop>
<prop key="statistic-sampling-enabled">false</prop>
<prop key="mcast-port">0</prop>
<prop key="log-level">warning</prop>
<prop key="log-level">error</prop>
</util:properties>
<gfe:cache properties-ref="gemfireProperties"/>
<gfe:cache-server port="15243"/>
<gfe:cache-server port="${spring.data.gemfire.cache.server.port:40404}"/>
<gfe:partitioned-region id="test-region"/>

View File

@@ -1,24 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:gfe="http://www.springframework.org/schema/gemfire"
xmlns:task="http://www.springframework.org/schema/task"
xmlns:util="http://www.springframework.org/schema/util"
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
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/gemfire http://www.springframework.org/schema/gemfire/spring-gemfire.xsd
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
">
<context:property-placeholder/>
<util:properties id="gemfireProperties">
<prop key="name">ContainerXmlSetupIntegrationTests</prop>
<prop key="log-level">warning</prop>
</util:properties>
<gfe:client-cache properties-ref="gemfireProperties"/>
<gfe:pool id="client" subscription-enabled="true">
<gfe:server host="localhost" port="40404"/>
<gfe:server host="localhost" port="${spring.data.gemfire.cache.server.port:40404}"/>
</gfe:pool>
<task:executor id="testTaskExecutor"/>

View File

@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:gfe-data="http://www.springframework.org/schema/data/gemfire"
xmlns:repo="http://www.springframework.org/schema/data/repository"
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
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/data/gemfire http://www.springframework.org/schema/data/gemfire/spring-data-gemfire.xsd
http://www.springframework.org/schema/data/repository http://www.springframework.org/schema/data/repository/spring-repository.xsd
">
<context:property-placeholder/>
<bean class="org.springframework.beans.factory.config.MethodInvokingBean">
<property name="targetClass" value="java.lang.System"/>
<property name="targetMethod" value="setProperty"/>
<property name="arguments">
<list>
<value>gemfire.log-level</value>
<value>warning</value>
</list>
</property>
</bean>
<gfe-data:datasource>
<gfe-data:server host="localhost" port="${spring.data.gemfire.cache.server.port:40404}"/>
</gfe-data:datasource>
<gfe-data:repositories base-package="org.springframework.data.gemfire.repository.sample">
<repo:include-filter type="assignable" expression="org.springframework.data.gemfire.repository.sample.PersonRepository"/>
</gfe-data:repositories>
</beans>

View File

@@ -1,28 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:gfe="http://www.springframework.org/schema/gemfire"
xmlns:util="http://www.springframework.org/schema/util"
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
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/gemfire http://www.springframework.org/schema/gemfire/spring-gemfire.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
">
<context:property-placeholder/>
<util:properties id="gemfireProperties">
<prop key="name">RepositoryClientRegionTestsServerContext</prop>
<prop key="name">RepositoryClientRegionIntegrationTestsServer</prop>
<prop key="mcast-port">0</prop>
<prop key="log-level">warning</prop>
</util:properties>
<gfe:cache properties-ref="gemfireProperties"/>
<gfe:cache-server/>
<gfe:cache-server port="${spring.data.gemfire.cache.server.port:40404}"/>
<gfe:replicated-region id="region" name="simple"/>
<gfe:replicated-region id="People" name="simple"/>
<bean class="org.springframework.data.gemfire.repository.sample.RegionPopulator">
<property name="region" ref="region"/>
<property name="region" ref="People"/>
</bean>
</beans>

View File

@@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:gfe-data="http://www.springframework.org/schema/data/gemfire"
xmlns:repo="http://www.springframework.org/schema/data/repository"
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
http://www.springframework.org/schema/data/gemfire http://www.springframework.org/schema/data/gemfire/spring-data-gemfire.xsd
http://www.springframework.org/schema/data/repository http://www.springframework.org/schema/data/repository/spring-repository.xsd
">
<gfe-data:datasource>
<gfe-data:server host="localhost" port="40404"/>
</gfe-data:datasource>
<gfe-data:repositories base-package="org.springframework.data.gemfire.repository.sample">
<repo:include-filter type="assignable" expression="org.springframework.data.gemfire.repository.sample.PersonRepository"/>
</gfe-data:repositories>
</beans>