User: starksm 
  Date: 02/03/03 23:40:02

  Modified:    src/main/org/jboss/test/security/test Tag: Branch_2_4
                        TestEJBSpec.java
  Log:
  Update the testCreate to expect a failure rather than success
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.6.2.9   +10 -3     
jbosstest/src/main/org/jboss/test/security/test/Attic/TestEJBSpec.java
  
  Index: TestEJBSpec.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jbosstest/src/main/org/jboss/test/security/test/Attic/TestEJBSpec.java,v
  retrieving revision 1.6.2.8
  retrieving revision 1.6.2.9
  diff -u -r1.6.2.8 -r1.6.2.9
  --- TestEJBSpec.java  3 Mar 2002 06:43:45 -0000       1.6.2.8
  +++ TestEJBSpec.java  4 Mar 2002 07:40:02 -0000       1.6.2.9
  @@ -35,7 +35,7 @@
    deployment unit. These test the basic role based access model.
    
    @author [EMAIL PROTECTED]
  - @version $Revision: 1.6.2.8 $
  + @version $Revision: 1.6.2.9 $
    */
   public class TestEJBSpec
      extends TestCase
  @@ -345,10 +345,17 @@
         obj = PortableRemoteObject.narrow(obj, StatelessSessionHome.class);
         StatelessSessionHome home = (StatelessSessionHome) obj;
         System.out.println("Found StatelessSessionHome");
  -      for(int i = 0; i < 1000; i ++)
  +      try
         {
            StatelessSession bean = home.create();
  -         bean.remove();
  +         // Need to invoke a method to ensure an ejbCreate call
  +         bean.noop();
  +         System.out.println("Bean.noop(), ok");
  +         fail("Was able to call getCallerPrincipal in ejbCreate");
  +      }
  +      catch(Exception e)
  +      {
  +         System.out.println("Create failed as expected");
         }
         logout();
      }
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to