![]() This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener). # Fixed URLs ## Fixed Success These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended. * [ ] http://www.apache.org/licenses/ with 1 occurrences migrated to: https://www.apache.org/licenses/ ([https](https://www.apache.org/licenses/) result 200). * [ ] http://www.apache.org/licenses/LICENSE-2.0 with 24 occurrences migrated to: https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200). * [ ] http://www.apache.org/licenses/LICENSE-2.0.txt with 1 occurrences migrated to: https://www.apache.org/licenses/LICENSE-2.0.txt ([https](https://www.apache.org/licenses/LICENSE-2.0.txt) result 200). |
||
---|---|---|
.. | ||
.mvn/wrapper | ||
mvnw | ||
mvnw.cmd | ||
pom.xml | ||
RabbitMQ-tutorials-soapui-project.xml | ||
README.md |
RabbitMQ tutorials ported to SoapUI
The code is based on the Java tutorials, with slight modifications to make it work in SoapUI.
Prerequisites
- SoapUI or ReadyAPI
with the Java Client JAR file in the
bin/ext
directory. - local RabbitMQ broker instance running with all the defaults
Running
You can import and run the RabbitMQ-tutorials-soapui-project.xml
in the GUI.
The project does not have any asserts; all log messages can be viewed in the "script log" tab.
You can also use the CLI runner:
$SOAPUI_HOME/bin/testrunner.sh RabbitMQ-tutorials-soapui-project.xml
.
Or you can use the provided Maven pom: ./mvnw verify
.
Tutorials
The code to send messages to RabbitMQ is pretty much unchanged from the Java tutorials. The biggest change is: there is no reading of the text of the message from the command line - the text of the message is included in each individual step.
There are two changes to the code to consume messages:
-
The program pauses for a bit to let the message get processed. Without this, SoapUI ends the script step immediately and kills the asynchronous process running in the background waiting for the message. The exact pause will depend on the specific case; it can be as simple as
sleep 10000
, or little more elaborate, e.g.:int stop = 0 while(message == null && stop++ < 20) { log.info " [*] Waiting for messages." sleep 500 }
-
At the end of each read script step, the channel and connections are closed explicitly:
channel.close() connection.close()
Without this, some background threads are still running and would make the test hang.