Yes, that was my point and I agree that what can be in the module should stay there. We do a lot of integration tests bootstrapping the broker and even if 1 test is quick, it overall takes time and some of them could really be unit tests.
Thanks for the clarification, it helps -- Jean-Louis Monteiro http://twitter.com/jlouismonteiro http://www.tomitribe.com On Mon, Jan 19, 2026 at 2:12 PM Jean-Baptiste Onofré <[email protected]> wrote: > Hi > > Historically, we have the activemq-unit-test module to host tests > applicable across multiple parts of the project or to test specific Jira. > We also have tests inside each module related to the module itself. > > The "challenge" is about the broker because the broker module gathers all > other modules. > > So, I would say that any module which is not broker (activemq-amqp, > activemq-http, activemq-jaas, ...) should have their own test. > The broker and client tests are either in the module or in the > activemq-unit-test module (depending on the scope). > > To better understand the cause of the test failure, I think it would not be > bad to have the activemq-unit-test tests dispatched in modules > (broker/client) where it makes sense, and really keep only cross module > test in activemq-unit-test. > > Regards > JB > > On Mon, Jan 19, 2026 at 11:56 AM Jean-Louis Monteiro < > [email protected]> wrote: > > > Hi all, > > > > I have a question regarding testing in ActiveMQ. > > > > I’m noticing that many tests under activemq-unit-tests are very scoped > to a > > single module, and (at least at first glance) could live alongside the > code > > they test. On recent PRs, this pattern seems to continue. > > > > Is there a rule or guideline that unit tests should be placed under > > activemq-unit-tests/ rather than in the module they belong to? > > > > Having a dedicated module makes sense to me for integration-style tests > (or > > anything that needs a wider broker setup / multiple modules). But for > tests > > that only exercise code within a given module, I’m curious what the > > rationale is (history, dependency constraints, shared test utilities, > > etc.). > > > > It’s not a problem per se, but activemq-unit-tests has grown quite large > > and is difficult to run locally. Splitting truly module-local tests back > > into their owning modules could make local iteration easier. > > > > Thanks in advance for any context! > > -- > > Jean-Louis Monteiro > > http://twitter.com/jlouismonteiro > > http://www.tomitribe.com > > >
