SGF-430 - Cleanup test failures on Windows due to incorrect Spring test context configuration resource resolution.

(cherry picked from commit 7462d7f607b668c20ded0e96ef7592a75ba35ba4)

Signed-off-by: John Blum <jblum@pivotal.io>
This commit is contained in:
John Blum
2015-09-10 13:00:59 -07:00
parent 28990b0bdf
commit 6016fa56a0
3 changed files with 4 additions and 9 deletions

View File

@@ -18,8 +18,6 @@ package org.springframework.data.gemfire.config;
import static org.junit.Assert.assertTrue;
import java.io.File;
import org.junit.Test;
import org.springframework.beans.factory.parsing.BeanDefinitionParsingException;
import org.springframework.context.support.ClassPathXmlApplicationContext;
@@ -40,7 +38,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
public class TemplateRegionDefinitionOrderErrorNamespaceTest {
protected String getConfigLocation() {
return getClass().getName().replaceAll("\\.", File.separator).concat("-context.xml");
return getClass().getName().replace(".", "/").concat("-context.xml");
}
@Test(expected = BeanDefinitionParsingException.class)

View File

@@ -20,7 +20,6 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import java.io.File;
import java.io.IOException;
import java.util.Collections;
import java.util.HashMap;
@@ -67,7 +66,7 @@ import com.gemstone.gemfire.pdx.internal.PdxInstanceEnum;
* @see com.gemstone.gemfire.pdx.PdxInstance
* @see com.gemstone.gemfire.pdx.PdxSerializer
* @see com.gemstone.gemfire.pdx.internal.PdxInstanceEnum
* @since 1.0.0
* @since 1.5.2
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration
@@ -88,7 +87,7 @@ public class ClientCacheFunctionExecutionWithPdxIntegrationTest {
}
protected static String toPathname(final Class type) {
return File.separator.concat(type.getName().replaceAll("\\.", File.separator));
return type.getName().replace(".", "/");
}
protected PdxInstance toPdxInstance(final Map<String, Object> pdxData) {

View File

@@ -33,7 +33,6 @@ import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.gemfire.fork.ServerProcess;
import org.springframework.data.gemfire.function.annotation.GemfireFunction;
import org.springframework.data.gemfire.function.sample.ExceptionThrowingFunctionExecution;
import org.springframework.data.gemfire.process.ProcessExecutor;
import org.springframework.data.gemfire.process.ProcessWrapper;
@@ -89,8 +88,7 @@ public class ExceptionThrowingFunctionExecutionIntegrationTest {
List<String> arguments = new ArrayList<String>();
arguments.add("-Dgemfire.name=" + serverName);
arguments.add(ExceptionThrowingFunctionExecutionIntegrationTest.class.getName().replaceAll("\\.",
File.separator)
arguments.add(ExceptionThrowingFunctionExecutionIntegrationTest.class.getName().replace(".", "/")
.concat("-server-context.xml"));
serverProcess = ProcessExecutor.launch(serverWorkingDirectory, ServerProcess.class,