Author: richard.opalka(a)jboss.com
Date: 2011-06-13 10:29:48 -0400 (Mon, 13 Jun 2011)
New Revision: 14535
Modified:
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/eardeployment/SupportServlet.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/XOPBase.java
Log:
[JBWS-3240] fixing tests relying on AS specific data dirs
Modified:
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/eardeployment/SupportServlet.java
===================================================================
---
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/eardeployment/SupportServlet.java 2011-06-13
10:59:03 UTC (rev 14534)
+++
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/eardeployment/SupportServlet.java 2011-06-13
14:29:48 UTC (rev 14535)
@@ -31,6 +31,7 @@
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.classloading.ClassLoaderProvider;
import org.jboss.wsf.spi.management.ServerConfig;
import org.jboss.wsf.spi.management.ServerConfigFactory;
@@ -58,8 +59,9 @@
{
if (dataDir == null)
{
+ ClassLoader loader =
ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader();
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- ServerConfig serverConfig =
spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
+ ServerConfig serverConfig = spiProvider.getSPI(ServerConfigFactory.class,
loader).getServerConfig();
dataDir = serverConfig.getServerDataDir();
}
return dataDir;
Modified:
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/XOPBase.java
===================================================================
---
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/XOPBase.java 2011-06-13
10:59:03 UTC (rev 14534)
+++
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/XOPBase.java 2011-06-13
14:29:48 UTC (rev 14535)
@@ -153,7 +153,15 @@
assertNotNull(response);
assertNotNull(response.getDataHandler().getContent());
- File tmpDir = new File(System.getProperty("jboss.home") + FS +
"server" + FS + System.getProperty("jboss.server.instance") + FS +
"tmp" + FS + "jbossws");
+ File tmpDir = null;
+ if (isTargetJBoss6())
+ {
+ tmpDir = new File(System.getProperty("jboss.home") + FS +
"server" + FS + System.getProperty("jboss.server.instance") + FS +
"tmp" + FS + "jbossws");
+ }
+ else
+ {
+ tmpDir = new File(System.getProperty("jboss.home") + FS +
"standalone" + FS + "tmp" + FS + "jbossws");
+ }
assertTrue("Temp dir doesn't exist: " + tmpDir, tmpDir.exists());
//[JBWS-2834]: windows file delete issue