ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntikho...@apache.org
Subject [48/50] incubator-ignite git commit: # ignite-gg-10416 Fixed tests.
Date Thu, 09 Jul 2015 13:03:00 GMT
# ignite-gg-10416 Fixed tests.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/546d5955
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/546d5955
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/546d5955

Branch: refs/heads/yarn
Commit: 546d5955a1fdb4a16c186242945d4a27ba13c52c
Parents: d04c104
Author: Andrey <anovikov@gridgain.com>
Authored: Thu Jul 9 17:14:10 2015 +0700
Committer: Andrey <anovikov@gridgain.com>
Committed: Thu Jul 9 17:14:10 2015 +0700

----------------------------------------------------------------------
 .../util/spring/IgniteSpringHelperImpl.java      | 10 +++++-----
 .../spring/IgniteExcludeInConfigurationTest.java |  5 ++++-
 .../org/apache/ignite/spring/sprint-exclude.xml  | 19 +++++++++++++++++++
 3 files changed, 28 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/546d5955/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
b/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
index 6cfca36..435f522 100644
--- a/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
+++ b/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
@@ -422,6 +422,8 @@ public class IgniteSpringHelperImpl implements IgniteSpringHelper {
         GenericApplicationContext springCtx = new GenericApplicationContext();
 
         if (excludedProps.length > 0) {
+            final List<String> excludedPropsList = Arrays.asList(excludedProps);
+
             BeanFactoryPostProcessor postProc = new BeanFactoryPostProcessor() {
                 /**
                  * @param def Registered BeanDefinition.
@@ -433,12 +435,10 @@ public class IgniteSpringHelperImpl implements IgniteSpringHelper {
                     while (iterVals.hasNext()) {
                         PropertyValue val = iterVals.next();
 
-                        for (String excludedProp : excludedProps) {
-                            if (val.getName().equals(excludedProp)) {
-                                iterVals.remove();
+                        if (excludedPropsList.contains(val.getName())) {
+                            iterVals.remove();
 
-                                return;
-                            }
+                            continue;
                         }
 
                         if (val.getValue() instanceof Iterable) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/546d5955/modules/spring/src/test/java/org/apache/ignite/spring/IgniteExcludeInConfigurationTest.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/apache/ignite/spring/IgniteExcludeInConfigurationTest.java
b/modules/spring/src/test/java/org/apache/ignite/spring/IgniteExcludeInConfigurationTest.java
index 1edca77..b708f21 100644
--- a/modules/spring/src/test/java/org/apache/ignite/spring/IgniteExcludeInConfigurationTest.java
+++ b/modules/spring/src/test/java/org/apache/ignite/spring/IgniteExcludeInConfigurationTest.java
@@ -40,7 +40,8 @@ public class IgniteExcludeInConfigurationTest extends GridCommonAbstractTest
{
     public void testExclude() throws Exception {
          IgniteSpringHelper spring = SPRING.create(false);
 
-        Collection<IgniteConfiguration> cfgs = spring.loadConfigurations(cfgLocation,
"typeMetadata").get1();
+        Collection<IgniteConfiguration> cfgs = spring.loadConfigurations(cfgLocation,
"fileSystemConfiguration",
+            "typeMetadata").get1();
 
         assertNotNull(cfgs);
         assertEquals(1, cfgs.size());
@@ -50,6 +51,8 @@ public class IgniteExcludeInConfigurationTest extends GridCommonAbstractTest
{
         assertEquals(1, cfg.getCacheConfiguration().length);
         assertNull(cfg.getCacheConfiguration()[0].getTypeMetadata());
 
+        assertNull(cfg.getFileSystemConfiguration());
+
         cfgs = spring.loadConfigurations(cfgLocation, "keyType").get1();
 
         assertNotNull(cfgs);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/546d5955/modules/spring/src/test/java/org/apache/ignite/spring/sprint-exclude.xml
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/apache/ignite/spring/sprint-exclude.xml b/modules/spring/src/test/java/org/apache/ignite/spring/sprint-exclude.xml
index 494f786..e6bf426 100644
--- a/modules/spring/src/test/java/org/apache/ignite/spring/sprint-exclude.xml
+++ b/modules/spring/src/test/java/org/apache/ignite/spring/sprint-exclude.xml
@@ -29,6 +29,25 @@
         http://www.springframework.org/schema/util
         http://www.springframework.org/schema/util/spring-util.xsd">
     <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
+        <property name="fileSystemConfiguration">
+            <list>
+                <bean class="org.apache.ignite.configuration.FileSystemConfiguration">
+                    <property name="name" value="test"/>
+                    <property name="metaCacheName" value="meta"/>
+                    <property name="dataCacheName" value="data"/>
+
+                    <property name="maxSpaceSize" value="#{100L * 1024 * 1024}"/>
+
+                    <!-- Loopback endpoint. -->
+                    <property name="ipcEndpointConfiguration">
+                        <bean class="org.apache.ignite.igfs.IgfsIpcEndpointConfiguration">
+                            <property name="type" value="TCP" />
+                        </bean>
+                    </property>
+                </bean>
+            </list>
+        </property>
+
         <!-- Cache configurations (all properties are optional). -->
         <property name="cacheConfiguration">
             <list>


Mime
View raw message