+ add fork mode for tests to alleviate the build server (again)

This commit is contained in:
costin
2010-07-16 18:24:17 +03:00
parent 13258143f0
commit f04ef7c89e
3 changed files with 19 additions and 3 deletions

14
pom.xml
View File

@@ -222,6 +222,14 @@ limitations under the License.
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<forkMode>always</forkMode>
</configuration>
</plugin>
</plugins>
</build>
@@ -319,6 +327,12 @@ limitations under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>2.5</version>
<configuration>
<targetJdk>1.5</targetJdk>
<linkXref>true</linkXref>
</configuration>
</plugin>
<!-- ============== -->

View File

@@ -136,7 +136,8 @@ public class GemfireBeanFactoryLocator implements BeanFactoryLocator, BeanFactor
if (!StringUtils.hasText(factoryKey)) {
if (!canUseDefaultBeanFactory)
throw new IllegalArgumentException(
"a non-null factoryKey needs to be specified as there are more then one factoryKeys available ");
"a non-null factoryKey needs to be specified as there are more then one factoryKeys available; "
+ beanFactories.keySet());
factory = defaultFactory;
}
else {

View File

@@ -17,6 +17,8 @@
package org.springframework.data.gemfire;
import junit.framework.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
@@ -50,7 +52,7 @@ public class CacheIntegrationTest {
public void testCacheWithProps() throws Exception {
Cache cache = ctx.getBean("cache-with-props", Cache.class);
// the name property seems to be ignored
// Assert.assertEquals("cache-with-props", cache.getDistributedSystem().getName());
Assert.assertEquals("cache-with-props", cache.getDistributedSystem().getName());
}
@Test
@@ -61,6 +63,5 @@ public class CacheIntegrationTest {
@Test
public void testCacheWithXml() throws Exception {
Cache cache = ctx.getBean("cache-with-xml", Cache.class);
//Assert.assertEquals("cache-with-props", cache.getDistributedSystem().getName());
}
}