[ https://issues.apache.org/jira/browse/CAMEL-10337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15932539#comment-15932539 ]
Fabrizio Spataro commented on CAMEL-10337: ------------------------------------------ I pull your code and running JUnit test using our asterisk server. There are results: AsteriskProducerTest is done. AsteriskConfigTest is done. AsteristConsumerTest is failure with error: {code} java.lang.AssertionError: mock://result Received message count 0, expected at least 1 at org.apache.camel.component.mock.MockEndpoint.fail(MockEndpoint.java:1452) at org.apache.camel.component.mock.MockEndpoint.assertTrue(MockEndpoint.java:1440) at org.apache.camel.component.mock.MockEndpoint.doAssertIsSatisfied(MockEndpoint.java:414) at org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied(MockEndpoint.java:386) at org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied(MockEndpoint.java:374) at org.apache.camel.component.asterisk.AsteriskConsumerTest.testReceiveTraps(AsteriskConsumerTest.java:43) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55) at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55) at org.junit.rules.RunRules.evaluate(RunRules.java:20) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192) {code} > camel-asterix - Endpoint should be singleton > -------------------------------------------- > > Key: CAMEL-10337 > URL: https://issues.apache.org/jira/browse/CAMEL-10337 > Project: Camel > Issue Type: Improvement > Reporter: Claus Ibsen > Assignee: Luca Burgazzoli > Priority: Minor > Fix For: 2.19.0 > > > We should favor to not store state on the endpoint but keep them as plain > configuration. > I added a TODO in the endpoint source code. > Also is the hostname option required to be configured? I think so, and if so > then add required=true to the UriParam. And also add some logic to check its > configured. > And also when the consumer stops, then the listener should be removed, eg > when you add a listetener, you should consider to also remove it. -- This message was sent by Atlassian JIRA (v6.3.15#6346)