11## Overview
22
33.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 ) .
86
97It is possible to use Visual Studio Community Edition .NET Core, and
108` dotnet.exe ` in ` PATH ` , to build the client and run the test suite.
@@ -24,7 +22,7 @@ build.bat
2422On MacOS and linux run:
2523
2624``` shell
27- build.sh
25+ ./ build.sh
2826```
2927
3028This 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.
4341### Option One: Using a RabbitMQ Release
4442
4543It 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
4745invoked directly without using an absolute file path. Note that this method does * not* work on Windows.
4846
4947On 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-
5351.\run-test.bat
5452```
5553
56- ### Option Two: Using RabbitMQ Umbrella Repository
54+ ### Option Two: Building a RabbitMQ Node from Source
5755
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 ) :
6057
6158```
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
6463make co
6564cd deps/rabbit
6665make
6766make run-broker
6867```
6968
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+
7172It is possible to override the location using ` RABBITMQ_RABBITMQCTL_PATH ` :
7273
7374```
@@ -104,15 +105,15 @@ Running individual tests and fixtures on Windows is trivial using the Visual Stu
104105To run a specific tests fixture on MacOS or Linux, use the NUnit filter expressions to select the tests to be run:
105106
106107``` shell
107- dotnet test projects/Unit -f netcoreapp3.1 - -filter " Name~TestAmqpUriParseFail"
108+ dotnet test projects/Unit --filter " Name~TestAmqpUriParseFail"
108109
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"
110111```
111112
112113## Running Tests for a Specific .NET Target
113114
114- To only run tests on .NET Core :
115+ To run tests targeting .NET 6.0 :
115116
116117``` shell
117- dotnet test -f netcoreapp3.1 projects/Unit
118+ dotnet test -f " .net6.0 " projects/Unit
118119```
0 commit comments