Testcase :failure
rajdeep_dua Mar 18, 2005 12:11 AMThis 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