Re: Testing JMX with camel-test-junit5

2024-01-02 Thread Steve973
I am going to switch over to the dev list for this. I did not know about that list until today. On Tue, Jan 2, 2024 at 4:30 PM Steve973 wrote: > Thanks. For the code that I included with my email, it didn't even get > that far. The ManagementAgent was null. I switched my test over to extend

Re: Testing JMX with camel-test-junit5

2024-01-02 Thread Steve973
Thanks. For the code that I included with my email, it didn't even get that far. The ManagementAgent was null. I switched my test over to extend CamelTestSupport, and I removed @CamelSpringTest, and now I can get the MBeanServer. I can list all of the beans by doing this: MBeanServer mBeanServ

Re: Testing JMX with camel-test-junit5

2024-01-02 Thread Claus Ibsen
Hi The mbean name you create is for a route, so it's a RouteMBean. You can use jconsole to look inside the running Camel test and see what mbeans there are etc. You can just add a thread sleep (long value) to keep the jvm running. Then find the right mbean you want to get and update your test co

Re: Testing JMX with camel-test-junit5

2024-01-02 Thread Steve973
Hi, Claus. Yes, I have included camel-management as a test-scoped dependency. On Tue, Jan 2, 2024 at 12:24 AM Claus Ibsen wrote: > Hi > > Have you added camel-management as a dependency. > > On Tue, Jan 2, 2024 at 2:15 AM Steve973 wrote: > > > Hello. I have a CamelSpringBootTest, and I am try

Re: Testing JMX with camel-test-junit5

2024-01-01 Thread Claus Ibsen
Hi Have you added camel-management as a dependency. On Tue, Jan 2, 2024 at 2:15 AM Steve973 wrote: > Hello. I have a CamelSpringBootTest, and I am trying to test that my > mbeans have been registered. This is how I am trying to check: > > @CamelSpringTest > @ContextConfiguration > @DirtiesCon

Testing JMX with camel-test-junit5

2024-01-01 Thread Steve973
Hello. I have a CamelSpringBootTest, and I am trying to test that my mbeans have been registered. This is how I am trying to check: @CamelSpringTest @ContextConfiguration @DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD) class DynamicRouterJmxIT { @Autowired C