1
0
mirror of synced 2024-11-22 01:13:49 +00:00

Merge branch 'release/3.0.2'

This commit is contained in:
Mark van Renswoude 2023-03-30 15:45:16 +02:00
commit db8026c5e7
3 changed files with 46 additions and 3 deletions

View File

@ -33,7 +33,7 @@ namespace Tapeti.Tests.Client
private const string ImageName = "rabbitmq"; private const string ImageName = "rabbitmq";
private const string ImageTag = "3.11.3-alpine"; private const string ImageTag = "3.11.3-management-alpine";
public async Task InitializeAsync() public async Task InitializeAsync()

View File

@ -1,7 +1,10 @@
using System.Text; using System;
using System.Collections.Generic;
using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using FluentAssertions; using FluentAssertions;
using RabbitMQ.Client;
using Tapeti.Connection; using Tapeti.Connection;
using Tapeti.Default; using Tapeti.Default;
using Tapeti.Exceptions; using Tapeti.Exceptions;
@ -68,6 +71,31 @@ namespace Tapeti.Tests.Client
} }
[Fact]
public async Task DurableQueueDeclareIncompatibleArguments()
{
using var rabbitmqClient = CreateRabbitMQClient();
using var model = rabbitmqClient.CreateModel();
var ok = model.QueueDeclare("incompatibleargs", true, false, false, new Dictionary<string, object>
{
{ "x-dead-letter-exchange", "d34db33f" }
});
model.Close();
rabbitmqClient.Close();
ok.Should().NotBeNull();
await client.DurableQueueDeclare("incompatibleargs", new QueueBinding[]
{
new("test", "#")
}, null, CancellationToken.None);
}
[Fact] [Fact]
public async Task PublishHandleOverflow() public async Task PublishHandleOverflow()
{ {
@ -97,6 +125,21 @@ namespace Tapeti.Tests.Client
// TODO test the other methods // TODO test the other methods
private RabbitMQ.Client.IConnection CreateRabbitMQClient()
{
var connectionFactory = new ConnectionFactory
{
HostName = "127.0.0.1",
Port = fixture.RabbitMQPort,
UserName = RabbitMQFixture.RabbitMQUsername,
Password = RabbitMQFixture.RabbitMQPassword,
AutomaticRecoveryEnabled = false,
TopologyRecoveryEnabled = false
};
return connectionFactory.CreateConnection();
}
private TapetiClient CreateClient() private TapetiClient CreateClient()
{ {

View File

@ -25,7 +25,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.*" /> <PackageReference Include="Newtonsoft.Json" Version="13.*" />
<PackageReference Include="RabbitMQ.Client" Version="6.*" /> <PackageReference Include="RabbitMQ.Client" Version="[6.4]" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="7.0.0" /> <PackageReference Include="System.Configuration.ConfigurationManager" Version="7.0.0" />
</ItemGroup> </ItemGroup>