Skip to content

Commit cc735e5

Browse files
committed
DATAES-6 - Changed integration tests to use non-persistent client mode.
Set newly introduced data attribute in the namespace to false to make sure there's no data persisted to the file system. This should allow re-running the build without stalling. Extracted common setup into infrastructure.xml.
1 parent 21111b6 commit cc735e5

File tree

7 files changed

+16
-7
lines changed

7 files changed

+16
-7
lines changed

src/main/java/org/springframework/data/elasticsearch/client/NodeClientFactoryBean.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* you may not use this file except in compliance with the License.
66
* You may obtain a copy of the License at
77
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
8+
* http://www.apache.org/licenses/LICENSE-2.0
99
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,

src/test/resources/custom-method-repository-test.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
xsi:schemaLocation="http://www.springframework.org/schema/data/elasticsearch http://www.springframework.org/schema/data/elasticsearch/spring-elasticsearch-1.0.xsd
66
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
77

8-
<elasticsearch:node-client id="client" local="true"/>
8+
<import resource="infrastructure.xml" />
99

1010
<bean name="elasticsearchTemplate" class="org.springframework.data.elasticsearch.core.ElasticsearchTemplate">
1111
<constructor-arg name="client" ref="client"/>

src/test/resources/elasticsearch-template-test.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
xsi:schemaLocation="http://www.springframework.org/schema/data/elasticsearch http://www.springframework.org/schema/data/elasticsearch/spring-elasticsearch-1.0.xsd
66
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
77

8-
<elasticsearch:node-client id="client" local="true"/>
8+
<import resource="infrastructure.xml" />
99

1010
<bean name="elasticsearchTemplate" class="org.springframework.data.elasticsearch.core.ElasticsearchTemplate">
1111
<constructor-arg name="client" ref="client"/>

src/test/resources/infrastructure.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<beans xmlns="http://www.springframework.org/schema/beans"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xmlns:elasticsearch="http://www.springframework.org/schema/data/elasticsearch"
5+
xsi:schemaLocation="http://www.springframework.org/schema/data/elasticsearch http://www.springframework.org/schema/data/elasticsearch/spring-elasticsearch.xsd
6+
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
7+
8+
<elasticsearch:node-client id="client" local="true" data="false" />
9+
10+
</beans>

src/test/resources/repository-non-document-entity.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
xsi:schemaLocation="http://www.springframework.org/schema/data/elasticsearch http://www.springframework.org/schema/data/elasticsearch/spring-elasticsearch-1.0.xsd
66
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
77

8-
<elasticsearch:node-client id="client" local="true"/>
8+
<import resource="infrastructure.xml" />
99

1010
<bean name="elasticsearchTemplate" class="org.springframework.data.elasticsearch.core.ElasticsearchTemplate">
1111
<constructor-arg name="client" ref="client"/>

src/test/resources/repository-test-nested-object.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
xsi:schemaLocation="http://www.springframework.org/schema/data/elasticsearch http://www.springframework.org/schema/data/elasticsearch/spring-elasticsearch-1.0.xsd
66
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
77

8-
<elasticsearch:node-client id="client" local="true"/>
9-
8+
<import resource="infrastructure.xml" />
109

1110
<bean name="elasticsearchTemplate" class="org.springframework.data.elasticsearch.core.ElasticsearchTemplate">
1211
<constructor-arg name="client" ref="client"/>

src/test/resources/simple-repository-test.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
xsi:schemaLocation="http://www.springframework.org/schema/data/elasticsearch http://www.springframework.org/schema/data/elasticsearch/spring-elasticsearch-1.0.xsd
66
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
77

8-
<elasticsearch:node-client id="client" local="true"/>
8+
<import resource="infrastructure.xml" />
99

1010
<bean name="elasticsearchTemplate" class="org.springframework.data.elasticsearch.core.ElasticsearchTemplate">
1111
<constructor-arg name="client" ref="client"/>

0 commit comments

Comments
 (0)