User: d_jencks
Date: 01/09/18 15:00:45
Modified: src/main/org/jboss/test/security/test
EJBAccessUnitTestCase.java EJBSpecUnitTestCase.java
ProjRepositoryUnitTestCase.java
SecurityProxyUnitTestCase.java
Log:
Changed tests to deploy/undeploy only once per testcase file. Moved clearAuthCache
to JBossTestServices
Revision Changes Path
1.4 +7 -13
jbosstest/src/main/org/jboss/test/security/test/EJBAccessUnitTestCase.java
Index: EJBAccessUnitTestCase.java
===================================================================
RCS file:
/cvsroot/jboss/jbosstest/src/main/org/jboss/test/security/test/EJBAccessUnitTestCase.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- EJBAccessUnitTestCase.java 2001/09/18 08:23:25 1.3
+++ EJBAccessUnitTestCase.java 2001/09/18 22:00:45 1.4
@@ -41,19 +41,6 @@
}
- /** Deploy the security ejb jar one time
- */
- protected void setUp() throws Exception
- {
- super.setUp();
- deployJ2ee("security.jar");
- }
-
- protected void tearDown() throws Exception
- {
- undeployJ2ee("security.jar");
- super.tearDown();
- }
public void testDeclarativeAccess() throws Exception
{
@@ -120,4 +107,11 @@
getLog().debug("Produced error as expected");
}
}
+
+ public static Test suite() throws Exception
+ {
+ return getJ2eeSetup(EJBAccessUnitTestCase.class, "security.jar");
+ }
+
+
}
1.5 +1 -12
jbosstest/src/main/org/jboss/test/security/test/EJBSpecUnitTestCase.java
Index: EJBSpecUnitTestCase.java
===================================================================
RCS file:
/cvsroot/jboss/jbosstest/src/main/org/jboss/test/security/test/EJBSpecUnitTestCase.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- EJBSpecUnitTestCase.java 2001/09/18 14:36:18 1.4
+++ EJBSpecUnitTestCase.java 2001/09/18 22:00:45 1.5
@@ -43,7 +43,7 @@
deployment unit. These test the basic role based access model.
@author [EMAIL PROTECTED]
- @version $Revision: 1.4 $
+ @version $Revision: 1.5 $
*/
public class EJBSpecUnitTestCase
extends JBossTestCase
@@ -340,17 +340,6 @@
}
}
- private static void flushAuthCache() throws Exception
- {
- String serverName = InetAddress.getLocalHost().getHostName();
- String connectorName = "jmx:" +serverName+ ":rmi";
- RMIConnector server = (RMIConnector) new
InitialContext().lookup(connectorName);
- ObjectName jaasMgr = new ObjectName("Security:name=JaasSecurityManager");
- // Ask the deployer for the getWarDeployerName
- Object[] params = {"other"};
- String[] signature = {"java.lang.String"};
- server.invoke(jaasMgr, "flushAuthenticationCache", params, signature);
- }
/**
* Setup the test suite.
1.3 +5 -26
jbosstest/src/main/org/jboss/test/security/test/ProjRepositoryUnitTestCase.java
Index: ProjRepositoryUnitTestCase.java
===================================================================
RCS file:
/cvsroot/jboss/jbosstest/src/main/org/jboss/test/security/test/ProjRepositoryUnitTestCase.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ProjRepositoryUnitTestCase.java 2001/09/17 17:33:53 1.2
+++ ProjRepositoryUnitTestCase.java 2001/09/18 22:00:45 1.3
@@ -46,7 +46,7 @@
* is deployed.
*
* @author [EMAIL PROTECTED]
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
*/
public class ProjRepositoryUnitTestCase
extends JBossTestCase
@@ -220,38 +220,17 @@
*/
protected void setUp() throws Exception
{
- super.setUp();
- deployJ2ee("security.jar");
// Set up a log4j configuration that logs on the console.
Category root = Category.getRoot();
root.setPriority(Priority.DEBUG);
root.addAppender(new WriterAppender(new PatternLayout("%x%m%n"),
System.out));
- // Deploy.deploy("security.jar");
}
- protected void tearDown() throws Exception
- {
- undeployJ2ee("security.jar");
- super.tearDown();
- }
-
- /**
- * Setup the test suite.
- * /
- public static Test suite() {
- TestSuite suite = new TestSuite();
-
- // add a test case to deploy our support applications
- String filename = "security.jar";
- suite.addTest(new Deploy.Deployer(filename));
-
- suite.addTest(new TestSuite(ProjRepositoryUnitTestCase.class));
-
- // add a test case to undeploy our support applications
- suite.addTest(new Deploy.Undeployer(filename));
+ public static Test suite() throws Exception
+ {
+ return getJ2eeSetup(ProjRepositoryUnitTestCase.class, "security.jar");
+ }
- return suite;
- }*/
/** Try to invoke getItem for the given name on the bean.
If this fails the bean will be discarded by the server,
1.3 +3 -28
jbosstest/src/main/org/jboss/test/security/test/SecurityProxyUnitTestCase.java
Index: SecurityProxyUnitTestCase.java
===================================================================
RCS file:
/cvsroot/jboss/jbosstest/src/main/org/jboss/test/security/test/SecurityProxyUnitTestCase.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SecurityProxyUnitTestCase.java 2001/09/17 17:33:53 1.2
+++ SecurityProxyUnitTestCase.java 2001/09/18 22:00:45 1.3
@@ -31,7 +31,7 @@
* security proxies.
*
* @author [EMAIL PROTECTED]
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
*/
public class SecurityProxyUnitTestCase
extends JBossTestCase
@@ -47,34 +47,9 @@
super(name);
}
- /**
- * Setup the test suite.
- * /
- public static Test suite() {
- TestSuite suite = new TestSuite();
-
- // add a test case to deploy our support applications
- String filename = "security-proxy.jar";
- suite.addTest(new Deploy.Deployer(filename));
-
- suite.addTest(new TestSuite(SecurityProxyUnitTestCase.class));
-
- // add a test case to undeploy our support applications
- suite.addTest(new Deploy.Undeployer(filename));
-
- return suite;
- }*/
-
- protected void setUp() throws Exception
- {
- super.setUp();
- deployJ2ee("security-proxy.jar");
- }
-
- protected void tearDown() throws Exception
+ public static Test suite() throws Exception
{
- undeployJ2ee("security-proxy.jar");
- super.tearDown();
+ return getJ2eeSetup(SecurityProxyUnitTestCase.class, "security-proxy.jar");
}
public void testProxiedStatelessBean() throws Exception
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development