Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/components/classic/documentation/developer-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ type: classic
The following documents might be interesting

* [Building](building)
* [Testing changes locally](testing-changes-locally)
* [Release Plans](release-plans)
* [Release Guide](release-guide)
* [Design Documents](design-documents)
Expand Down
1 change: 1 addition & 0 deletions src/components/classic/documentation/developers.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ type: classic
* [Becoming a committer](https://infra.apache.org/new-committers-guide.html)
* [Benchmark Tests](benchmark-tests)
* [Building](building)
* [Testing your changes locally](testing-changes-locally)
* [Code Overview](code-overview)
* [Developer Guide](developer-guide)
* [Design Documents](design-documents)
Expand Down
39 changes: 39 additions & 0 deletions src/components/classic/documentation/testing-changes-locally.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
layout: default_md
title: Testing changes locally
title-class: page-title-classic
type: classic
---

[Developers](developers) > [Testing changes locally](testing-changes-locally)

Testing changes locally
-----------------------------

### 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'.

```
# 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.

```
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
Comment on lines +19 to +21
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.

```
Unzip that target and start the ActiveMQ broker which contains your change
```
$ 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.

```

### ActiveMQ client

Testing the client library is a bit trickier because you will need a test client (that imports your newly built client library). There are many ways to do it, overall the idea is:

- Build the activemq-client pakcage
- 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.
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.