Temporary RabbitMQ.Client version fix for #41
Added test for incompatible queue arguments
This commit is contained in:
parent
8250a7181f
commit
5fc010a7e1
@ -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()
|
||||||
|
@ -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()
|
||||||
{
|
{
|
||||||
|
@ -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>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user