gemmellr commented on code in PR #131: URL: https://github.com/apache/activemq-website/pull/131#discussion_r2549163193
########## src/components/classic/documentation/testing-changes-locally.md: ########## @@ -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. Review Comment: 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'. ########## src/components/classic/documentation/testing-changes-locally.md: ########## @@ -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. +``` +# At root directory +$ mvn -Dtest=false -DfailIfNoTests=false clean install +``` +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 +``` +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 +``` + +### 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. Review Comment: 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. ########## src/components/classic/documentation/testing-changes-locally.md: ########## @@ -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. +``` +# At root directory +$ mvn -Dtest=false -DfailIfNoTests=false clean install +``` +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 +``` +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 Review Comment: 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. ########## src/components/classic/documentation/testing-changes-locally.md: ########## @@ -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. +``` +# At root directory +$ mvn -Dtest=false -DfailIfNoTests=false clean install +``` +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 Review Comment: 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. ########## src/components/classic/documentation/testing-changes-locally.md: ########## @@ -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. +``` +# At root directory +$ mvn -Dtest=false -DfailIfNoTests=false clean install Review Comment: `mvn clean install -DskipTests` would be far more typical for a basic build command. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information, visit: https://activemq.apache.org/contact
