[jboss-cvs] JBossAS SVN: r64947 - trunk/testsuite/src/main/org/jboss/test/web/test.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Aug 29 09:41:15 EDT 2007
Author: stan.silvert at jboss.com
Date: 2007-08-29 09:41:14 -0400 (Wed, 29 Aug 2007)
New Revision: 64947
Modified:
trunk/testsuite/src/main/org/jboss/test/web/test/JSFIntegrationUnitTestCase.java
Log:
JBAS-4650
Modified: trunk/testsuite/src/main/org/jboss/test/web/test/JSFIntegrationUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/web/test/JSFIntegrationUnitTestCase.java 2007-08-29 13:29:48 UTC (rev 64946)
+++ trunk/testsuite/src/main/org/jboss/test/web/test/JSFIntegrationUnitTestCase.java 2007-08-29 13:41:14 UTC (rev 64947)
@@ -48,13 +48,11 @@
*/
public class JSFIntegrationUnitTestCase extends JBossTestCase
{
- private String baseURL = HttpUtils.getBaseURL();
- private HttpClient client = new HttpClient();
-
// Call Log4jService to set logging levels for the JSF impl before the WAR
// is deployed
- public void setUp() throws Exception
+ public static void setLoggingLevels() throws Exception
{
+ HttpClient client = new HttpClient();
client.executeMethod(new GetMethod(makeSetLoggerCmd(Util.FACES_LOGGER, "ALL")));
client.executeMethod(new GetMethod(makeSetLoggerCmd(Util.FACES_LOGGER + Util.TAGLIB_LOGGER, "FATAL")));
client.executeMethod(new GetMethod(makeSetLoggerCmd(Util.FACES_LOGGER + Util.APPLICATION_LOGGER, "ERROR")));
@@ -65,8 +63,9 @@
client.executeMethod(new GetMethod(makeSetLoggerCmd(Util.FACES_LOGGER + Util.RENDERKIT_LOGGER, "OFF")));
}
- private String makeSetLoggerCmd(String log4jLogger, String log4jPriority)
+ private static String makeSetLoggerCmd(String log4jLogger, String log4jPriority)
{
+ String baseURL = HttpUtils.getBaseURL();
return baseURL +
"jmx-console/HtmlAdaptor?" +
"action=invokeOp&" +
@@ -85,8 +84,9 @@
*/
public void testJSFIntegrated() throws Exception
{
+ HttpClient client = new HttpClient();
client.executeMethod(makeRequest());
-
+
HttpMethodBase result = makeRequest();
// need to hit it twice with the same session for test to pass
@@ -131,11 +131,15 @@
}
private GetMethod makeRequest() {
+ String baseURL = HttpUtils.getBaseURL();
return new GetMethod(baseURL+"jbosstest-jsf/index.jsf");
}
public static Test suite() throws Exception
{
+ // need to set up the JSF loggers before the WAR is deployed
+ setLoggingLevels();
+
TestSuite suite = new TestSuite();
suite.addTest(new TestSuite(JSFIntegrationUnitTestCase.class));
More information about the jboss-cvs-commits
mailing list