Skip to content

Conversation

@kenliao94
Copy link
Contributor

Add documentation on how to test changes locally. Make onboarding new contributor to ActiveMQ easier.

image

-----------------------------

### Broker
After running existing or newly added unit tests, if you want to do integration testing on your change, you can [build](building) the repo locally to generate the release bundle and then unzip the bundle to test broker behaviour.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd expect a page about 'testing changes locally' to actually actually cover something about the tests, or at the very least reference to some other existing content that does speak to running tests, rather than gloss over it with simply "After running existing or newly added unit tests".

Maybe the page title needs a rethink. This seems more about 'running an example with your locally-built changes'.

Comment on lines +19 to +21
If the build was successful. You will see a message similar to the one below
```
[INFO] Installing /Users/xxx/amzn/personal_workspace/activemq/assembly/target/apache-activemq-6.2.0-SNAPSHOT-bin.zip to /Users/xxx/.m2/repository/org/apache/activemq/apache-activemq/6.2.0-SNAPSHOT/apache-activemq-6.2.0-SNAPSHOT-bin.zip
Copy link
Member

@gemmellr gemmellr Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think either this can use far more generalised paths, e.g <home-dir> prefix, or /path/to/.....or better yet, it would maybe not be here at all.

The typical place to point to Maven build output is a module target directory, so I'd suggest just telling folks to wait for e.g the completion of the build (e.g 'BUILD SUCCESS') and then to go into e.g assembly/target to find the built content to then use.

$ cd /Users/xxx/.m2/repository/org/apache/activemq/apache-activemq/6.2.0-SNAPSHOT
$ unzip apache-activemq-6.2.0-SNAPSHOT-bin.zip
$ cd apache-activemq-6.2.0-SNAPSHOT
$ ./bin/activemq console
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

People shouldnt be directed to extract stuff into their maven local repo and pollute it with non-build content thats likely to go stale. They can extract it in the build directories (i.e target) that will be cleaned up any time they do a clean.

- Copy the output jar into your test client or local mvn repository
- Run your test client

You can take a look at this [sample test client](https://github.com/kenliao94/activemq-client-test) and follow its README. No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in pakcage.

Directing folks to something in the existing examples (e.g. also included in the distribution built and used above) would seem far nicer than adding yet another, especially one complicated with shading, and which we also wouldn't want to link to an non-project repo for.

After running existing or newly added unit tests, if you want to do integration testing on your change, you can [build](building) the repo locally to generate the release bundle and then unzip the bundle to test broker behaviour.
```
# At root directory
$ mvn -Dtest=false -DfailIfNoTests=false clean install
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mvn clean install -DskipTests would be far more typical for a basic build command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants