3 Replies Latest reply on Mar 19, 2005 7:02 AM by rajdeep_dua

    Testcase :failure

      This is the simple test case i was talking about in the previous topic,connection.getClientID fails,
      Is it a bug or a functionality to be implemented?

      public void testClientID() {
       //log.info("inside testQueueConection");
       try {
       connection = connFactory.createConnection();
       String defaultClientID = connection.getClientID();
       String testID = "TestClientID";
       log.debug("defaultclient id :" + defaultClientID);
       connection.setClientID(testID);
       assertEquals(testID, connection.getClientID());
       } catch (JMSException jms) {
       log.error(jms);
       fail("Exception raised " + jms);
       }catch(Exception e){
       log.error(e);
       fail("Exception raised " + e);
       }
       }


      And here is the junit output

      [junit] Running org.jboss.test.messaging.jmsapi.connection.QueueConnectionTest
       [junit] 05:01:19,255 INFO [LogInterceptor] invoke: method=getClientID params=[]
       [junit] 05:01:19,265 INFO [LogInterceptor] error in invoke: method=getClientID params=[]
       [junit] java.lang.UnsupportedOperationException: public abstract java.lang.String org.jboss.messaging.jms.client.Con
      nectionDelegate.getClientID() throws javax.jms.JMSException
       [junit] at org.jboss.messaging.jms.server.container.ServerConnectionInterceptor.invoke(ServerConnectionIntercept
      or.java:53)
       [junit] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:66)
       [junit] at org.jboss.messaging.jms.server.container.ServerFactoryInterceptor.invoke(ServerFactoryInterceptor.jav
      a:51)
       [junit] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:66)
       [junit] at org.jboss.messaging.jms.container.ObjectOverrideInterceptor.invoke(ObjectOverrideInterceptor.java:62)
      
       [junit] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:66)
       [junit] at org.jboss.aop.joinpoint.InvocationBase.invokeNext(InvocationBase.java:125)
       [junit] at org.jboss.messaging.jms.container.Container.invoke(Container.java:161)
       [junit] at org.jboss.messaging.jms.container.ForwardInterceptor.invoke(ForwardInterceptor.java:53)
       [junit] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:66)
       [junit] at org.jboss.messaging.jms.client.container.FactoryInterceptor.invoke(FactoryInterceptor.java:52)
       [junit] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:66)
       [junit] at org.jboss.messaging.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:99)
       [junit] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:66)
       [junit] at org.jboss.messaging.jms.container.LogInterceptor.invoke(LogInterceptor.java:54)
       [junit] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:66)
       [junit] at org.jboss.messaging.jms.client.container.JMSExceptionInterceptor.invoke(JMSExceptionInterceptor.java:
      47)
       [junit] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:66)
       [junit] at org.jboss.messaging.jms.container.ObjectOverrideInterceptor.invoke(ObjectOverrideInterceptor.java:62)
      
       [junit] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:66)
       [junit] at org.jboss.messaging.jms.container.Container.invoke(Container.java:179)
       [junit] at $Proxy0.getClientID(Unknown Source)
       [junit] at org.jboss.messaging.jms.client.facade.JBossConnection.getClientID(JBossConnection.java:121)
       [junit] at org.jboss.test.messaging.jmsapi.connection.QueueConnectionTest.testClientID(QueueConnectionTest.java:
      50)
       [junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       [junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       [junit] at java.lang.reflect.Method.invoke(Method.java:324)
       [junit] at junit.framework.TestCase.runTest(TestCase.java:154)
       [junit] at junit.framework.TestCase.runBare(TestCase.java:127)
       [junit] at junit.framework.TestResult$1.protect(TestResult.java:106)
       [junit] at junit.framework.TestResult.runProtected(TestResult.java:124)
       [junit] at junit.framework.TestResult.run(TestResult.java:109)
       [junit] at junit.framework.TestCase.run(TestCase.java:118)
       [junit] at junit.framework.TestSuite.runTest(TestSuite.java:208)
       [junit] at junit.framework.TestSuite.run(TestSuite.java:203)
       [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:289)
       [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:656)
       [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:558)
       [junit] 05:01:19,285 ERROR [QueueConnectionTest] org.jboss.messaging.jms.client.facade.JBossJMSException: Error
       [junit] 05:01:19,285 INFO [QueueConnectionTest] ========== Stop test: testClientID
       [junit] Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 0.251 sec


        • 1. Re: Testcase :failure

          a. got the reason--

          org.jboss.messaging.jms.server.container.ServerConnectionInterceptor.invoke()


          functionality still has to be imlpemented.

          b.Would appreciate if the timelines when the JMSFacade would be in place,for my testcases to run and do their job.

          c.i am using the following way of getting the connectionfactory
          Properties props = new Properties();
           props.put("java.naming.factory.initial","org.jboss.messaging.util.StandaloneInitialContextFactory");
           ctx = new InitialContext(props);


          Is this the right approach

          For desintations i am using the following approach-
          javax.jms.Destination destination = new org.jboss.messaging.jms.destination.JBossDestination(destName);


          • 2. Re: Testcase :failure
            ovidiu.feodorov

            a. The current JMS Facade in CVS is just an incomplete prototype. DO NOT try to run any test on it, or you will just waste your time.

            b. I plan to check in the new JMS Facade some time this weekend. When I do it, I will make an announcement on this forum.

            c. Do not use org.jboss.messaging.util.StandaloneInitialContextFactory for your "java.naming.factory.initial". The new facade will require a fully functional JNDI server (the JBoss' JNP). I will write a document explaining how to use it as soon as the code is in CVS.

            • 3. Re: Testcase :failure

              Waiting for the announcement! and the document