1
1
## Overview
2
2
3
3
.NET client's test suite assumes there's a RabbitMQ node listening on ` localhost:5672 `
4
- (the default settings). SSL tests require a broker listening on the default
5
- SSL port. Connection recovery tests assume ` rabbitmqctl ` at ` ../rabbitmq-server/scripts/rabbitmqctl `
6
- can control the running node: this is the case when all repositories are cloned using
7
- the [ umbrella repository] ( https://github.com/rabbitmq/rabbitmq-public-umbrella ) .
4
+ (the default settings). TLS tests require a node listening on the default
5
+ [ TLS port] ( https://rabbitmq.com/ssl.html ) .
8
6
9
7
It is possible to use Visual Studio Community Edition .NET Core, and
10
8
` dotnet.exe ` in ` PATH ` , to build the client and run the test suite.
@@ -24,7 +22,7 @@ build.bat
24
22
On MacOS and linux run:
25
23
26
24
``` shell
27
- build.sh
25
+ ./ build.sh
28
26
```
29
27
30
28
This will complete the code AMQP 0-9-1 protocol code generation and build all projects. After this open the solution in Visual Studio.
@@ -43,7 +41,7 @@ Two options to accomplish this are covered below.
43
41
### Option One: Using a RabbitMQ Release
44
42
45
43
It is possible to install and run a node using any [ binary build] ( https://www.rabbitmq.com/download.html )
46
- suitable for the platform. Its [ CLI tools] ( ) then must be added to ` PATH ` so that ` rabbitmqctl ` can be
44
+ suitable for the platform. Its [ CLI tools] ( https://rabbitmq.com/cli.html ) then must be added to ` PATH ` so that ` rabbitmqctl ` can be
47
45
invoked directly without using an absolute file path. Note that this method does * not* work on Windows.
48
46
49
47
On Windows, you must run unit tests as follows (replace ` X.Y.Z ` with your RabbitMQ version):
@@ -53,21 +51,24 @@ set "RABBITMQ_RABBITMQCTL_PATH=C:\Program Files\RabbitMQ Server\rabbitmq_server-
53
51
.\run-test.bat
54
52
```
55
53
56
- ### Option Two: Using RabbitMQ Umbrella Repository
54
+ ### Option Two: Building a RabbitMQ Node from Source
57
55
58
- Team RabbitMQ uses [ rabbitmq-public-umbrella] ( https://github.com/rabbitmq/rabbitmq-public-umbrella ) ,
59
- which makes it easy to run a RabbitMQ node [ built from source] ( https://www.rabbitmq.com/build-server.html ) :
56
+ T run a RabbitMQ node [ built from source] ( https://www.rabbitmq.com/build-server.html ) :
60
57
61
58
```
62
- git clone https://github.com/rabbitmq/rabbitmq-public-umbrella umbrella
63
- cd umbrella
59
+ git clone https://github.com/rabbitmq/rabbitmq-server.git rabbitmq-server
60
+ cd rabbitmq-server
61
+
62
+ # assumes Make is available
64
63
make co
65
64
cd deps/rabbit
66
65
make
67
66
make run-broker
68
67
```
69
68
70
- ` rabbitmqctl ` location will be computed using a relative path in the umbrella.
69
+ ` rabbitmqctl ` location will be computed using a relative path under the source repository,
70
+ in this example, it should be ` ./rabbitmq-server/deps/rabbit/sbin/rabbitmqctl ` .
71
+
71
72
It is possible to override the location using ` RABBITMQ_RABBITMQCTL_PATH ` :
72
73
73
74
```
@@ -104,15 +105,15 @@ Running individual tests and fixtures on Windows is trivial using the Visual Stu
104
105
To run a specific tests fixture on MacOS or Linux, use the NUnit filter expressions to select the tests to be run:
105
106
106
107
``` shell
107
- dotnet test projects/Unit -f netcoreapp3.1 - -filter " Name~TestAmqpUriParseFail"
108
+ dotnet test projects/Unit --filter " Name~TestAmqpUriParseFail"
108
109
109
- dotnet test projects/Unit -f netcoreapp3.1 - -filter " FullyQualifiedName~RabbitMQ.Client.Unit.TestHeartbeats"
110
+ dotnet test projects/Unit --filter " FullyQualifiedName~RabbitMQ.Client.Unit.TestHeartbeats"
110
111
```
111
112
112
113
## Running Tests for a Specific .NET Target
113
114
114
- To only run tests on .NET Core :
115
+ To run tests targeting .NET 6.0 :
115
116
116
117
``` shell
117
- dotnet test -f netcoreapp3.1 projects/Unit
118
+ dotnet test -f " .net6.0 " projects/Unit
118
119
```
0 commit comments