1
- Overview
2
- ========
1
+ ## Overview
3
2
4
3
There are multiple test suites in the RabbitMQ Java client library;
5
4
the source for all of the suites can be found in the test/src
6
5
directory.
7
6
8
7
The suites are:
9
8
10
- Client tests
11
- Functional tests
12
- Server tests
13
- SSL tests
9
+ * Client tests
10
+ * Functional tests
11
+ * Server tests
12
+ * SSL tests
14
13
15
- The Server test suite cannot be launched from the public umbrella
16
- ( https://github.com/rabbitmq/rabbitmq-public-umbrella.git ). Attempting
17
- to launch this suite by executing the "test-server" ant target will fail,
18
- because test necessary prerequisites are not present in the public
19
- umbrella.
20
-
21
- All other tests require a conforming server listening on localhost:5672
14
+ All of them assume a RabbitMQ node listening on localhost:5672
22
15
(the default settings). SSL tests require a broker listening on the default
23
- SSL port. For details on running specific tests, see below.
16
+ SSL port. Connection recovery tests assume ` rabbitmqctl ` at ` ../rabbitmq-server/scripts/rabbitmqctl `
17
+ can control the running node: this is the case when all repositories are cloned using
18
+ the [ umbrella repository] ( https://github.com/rabbitmq/rabbitmq-public-umbrella ) .
19
+
20
+ For details on running specific tests, see below.
24
21
25
22
26
- Running a Specific Test
10000
Suite
27
- =============================
23
+ ## Running a Specific Test Suite
28
24
29
25
To run a specific test suite you should execute one of the following in the
30
26
top-level directory of the source tree:
31
27
32
- ant test-client
33
- ant test-functional
34
- ant test-ssl
35
-
28
+ # runs unit tests
29
+ ant test-client
30
+ # runs integration/functional tests
31
+ ant test-functional
32
+ # runs TLS tests
33
+ ant test-ssl
34
+ # run all test suites
35
+ ant test-suite
36
36
37
37
For example, to run the client tests:
38
38
39
+ ```
39
40
----------------- Example shell session -------------------------------------
40
41
rabbitmq-java-client$ ant test-client
41
42
Buildfile: build.xml
@@ -58,19 +59,19 @@ test-client:
58
59
59
60
BUILD SUCCESSFUL
60
61
-----------------------------------------------------------------------------
62
+ ```
61
63
62
- If any tests are broken details can be found by viewing this file:
63
- build/TEST-com.rabbitmq.client.test.ClientTests.txt
64
+ Test failures and errors are logged to ` build/TEST-* ` .
64
65
65
66
66
- SSL Test Setup
67
- --------------
67
+ ## SSL Test Setup
68
68
69
69
To run the SSL tests, the RabbitMQ server and Java client should be configured
70
- as per the SSL instructions on the RabbitMQ website. The SSL_CERTS_DIR
70
+ as per the SSL instructions on the RabbitMQ website. The ` SSL_CERTS_DIR `
71
71
environment variable must point to a certificate folder with the following
72
72
minimal structure:
73
73
74
+ ```
74
75
$SSL_CERTS_DIR
75
76
|-- client
76
77
| |-- keycert.p12
@@ -81,12 +82,14 @@ minimal structure:
81
82
| \-- key.pem
82
83
\-- testca
83
84
\-- cacert.pem
85
+ ```
84
86
85
- The PASSWORD environment variable must be set to the password of the keycert.p12
87
+ The ` PASSWORD ` environment variable must be set to the password of the keycert.p12
86
88
PKCS12 keystore. The broker must be configured to validate client certificates.
87
- This will become minimal broker configuration file if $SSL_CERTS_DIR is replaced
89
+ This will become minimal broker configuration file if ` $SSL_CERTS_DIR ` is replaced
88
90
with the certificate folder:
89
91
92
+ ``` erlang
90
93
% %%%% begin sample test broker configuration
91
94
[{rabbit , [{ssl_listeners , [5671 ]},
92
95
{ssl_options , [{cacertfile ," $SSL_CERTS_DIR/testca/cacert.pem" },
@@ -95,5 +98,4 @@ with the certificate folder:
95
98
{verify ,verify_peer },
96
99
{fail_if_no_peer_cert , false }]}]}].
97
100
% %%%% end sample test broker configuration
98
-
99
-
101
+ ```
0 commit comments