Skip to content

Commit 7a92489

Browse files
committed
* No more skipped tests
1 parent f7809e3 commit 7a92489

File tree

1 file changed

+11
-21
lines changed

1 file changed

+11
-21
lines changed

Tests/ConnectionRecoveryTests.cs

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@
88
using System.Threading.Tasks;
99
using RabbitMQ.AMQP.Client;
1010
using RabbitMQ.AMQP.Client.Impl;
11+
using Xunit;
1112
using Xunit.Abstractions;
1213

1314
namespace Tests;
1415

15-
using Xunit;
16-
1716
internal class FakeBackOffDelayPolicyDisabled : IBackOffDelayPolicy
1817
{
1918
public int Delay()
@@ -53,7 +52,7 @@ public class ConnectionRecoveryTests(ITestOutputHelper testOutputHelper)
5352
/// The error _must_ be null when the connection is closed normally even the recovery is activated.
5453
/// </summary>
5554
/// <param name="activeRecovery"> If the recovery is enabled.</param>
56-
[SkippableTheory]
55+
[Theory]
5756
[InlineData(true)]
5857
[InlineData(false)]
5958
public async Task NormalCloseTheStatusShouldBeCorrectAndErrorNull(bool activeRecovery)
@@ -103,12 +102,11 @@ public async Task NormalCloseTheStatusShouldBeCorrectAndErrorNull(bool activeRec
103102
/// then the connection is closed normally. so the status should be:
104103
/// - From Open to Closed
105104
/// </summary>
106-
[SkippableFact]
105+
[Fact]
107106
public async Task UnexpectedCloseTheStatusShouldBeCorrectAndErrorNotNull()
108107
{
109108
Assert.Null(_connection);
110109
Assert.Null(_management);
111-
// Skip.If(true, "rabbitmq-dotnet-client-87");
112110

113111
IConnection connection = await AmqpConnection.CreateAsync(
114112
ConnectionSettingBuilder.Create().ContainerId(_containerId).RecoveryConfiguration(
@@ -177,12 +175,11 @@ public async Task UnexpectedCloseTheStatusShouldBeCorrectAndErrorNotNull()
177175
/// By default, the backoff is active it will be disabled after some failed attempts.
178176
/// See the BackOffDelayPolicy class for more details.
179177
/// </summary>
180-
[SkippableFact]
178+
[Fact]
181179
public async Task OverrideTheBackOffWithBackOffDisabled()
182180
{
183181
Assert.Null(_connection);
184182
Assert.Null(_management);
185-
// Skip.If(true, "rabbitmq-dotnet-client-87");
186183

187184
IConnection connection = await AmqpConnection.CreateAsync(
188185
ConnectionSettingBuilder.Create().ContainerId(_containerId).RecoveryConfiguration(
@@ -241,12 +238,11 @@ public async Task OverrideTheBackOffWithBackOffDisabled()
241238
/// When the topology-recover is Enabled the temp queues should be recovered.
242239
/// the Queue is a temp queue with the Auto-Delete and Exclusive flag set to true.
243240
/// </summary>
244-
[SkippableFact]
241+
[Fact]
245242
public async Task RecoveryTopologyShouldRecoverTheTempQueues()
246243
{
247244
Assert.Null(_connection);
248245
Assert.Null(_management);
249-
// Skip.If(true, "rabbitmq-dotnet-client-87");
250246

251247
string queueName = $"temp-queue-should-recover-{true}";
252248
IConnection connection = await AmqpConnection.CreateAsync(
@@ -290,12 +286,11 @@ public async Task RecoveryTopologyShouldRecoverTheTempQueues()
290286
/// When the topology-recover is Disabled the temp queues should not be recovered.
291287
/// the Queue is a temp queue with the Auto-Delete and Exclusive flag set to true.
292288
/// </summary>
293-
[SkippableFact]
289+
[Fact]
294290
public async Task RecoveryTopologyShouldNotRecoverTheTempQueues()
295291
{
296292
Assert.Null(_connection);
297293
Assert.Null(_management);
298-
// Skip.If(true, "rabbitmq-dotnet-client-87");
299294

300295
string queueName = $"temp-queue-should-recover-{false}";
301296
IConnection connection = await AmqpConnection.CreateAsync(
@@ -328,14 +323,13 @@ public async Task RecoveryTopologyShouldNotRecoverTheTempQueues()
328323
Assert.Equal(0, topologyListener.QueueCount());
329324
}
330325

331-
[SkippableTheory]
326+
[Theory]
332327
[InlineData(true)]
333328
[InlineData(false)]
334329
public async Task RecoveryTopologyShouldRecoverExchanges(bool topologyEnabled)
335330
{
336331
Assert.Null(_connection);
337332
Assert.Null(_management);
338-
// Skip.If(true, "rabbitmq-dotnet-client-87");
339333

340334
const string exchangeName = "exchange-should-recover";
341335
IConnection connection = await AmqpConnection.CreateAsync(
@@ -388,14 +382,13 @@ public async Task RecoveryTopologyShouldRecoverExchanges(bool topologyEnabled)
388382
connection.Dispose();
389383
}
390384

391-
[SkippableTheory]
385+
[Theory]
392386
[InlineData(true)]
393387
[InlineData(false)]
394388
public async Task RecoveryTopologyShouldRecoverBindings(bool topologyEnabled)
395389
{
396390
Assert.Null(_connection);
397391
Assert.Null(_management);
398-
// Skip.If(true, "rabbitmq-dotnet-client-87");
399392

400393
IConnection connection = await AmqpConnection.CreateAsync(
401394
ConnectionSettingBuilder.Create()
@@ -472,12 +465,11 @@ await SystemUtils.WaitUntilBindingsBetweenExchangeAndQueueDontExistAsync("exchan
472465
///
473466
/// Only at the end the queue will be removed and bindings should be zero.
474467
/// </summary>
475-
[SkippableFact]
468+
[Fact]
476469
public async Task RemoveAQueueShouldRemoveTheBindings()
477470
{
478471
Assert.Null(_connection);
479472
Assert.Null(_management);
480-
// Skip.If(true, "rabbitmq-dotnet-client-87");
481473

482474
IConnection connection = await AmqpConnection.CreateAsync(
483475
ConnectionSettingBuilder.Create()
@@ -535,12 +527,11 @@ await SystemUtils.WaitUntilBindingsBetweenExchangeAndQueueDontExistAsync("e-remo
535527
await connection.CloseAsync();
536528
}
537529

538-
[SkippableFact]
530+
[Fact]
539531
public async Task RemoveAnExchangeShouldRemoveTheBindings()
540532
{
541533
Assert.Null(_connection);
542534
Assert.Null(_management);
543-
// Skip.If(true, "rabbitmq-dotnet-client-87");
544535

545536
IConnection connection = await AmqpConnection.CreateAsync(
546537
ConnectionSettingBuilder.Create()
@@ -603,12 +594,11 @@ await SystemUtils.WaitUntilBindingsBetweenExchangeAndQueueDontExistAsync(
603594
/// <summary>
604595
/// This test is specific to check if the bindings are removed when a destination exchange is removed.
605596
/// </summary>
606-
[SkippableFact]
597+
[Fact]
607598
public async Task RemoveAnExchangeBoundToAnotherExchangeShouldRemoveTheBindings()
608599
{
609600
Assert.Null(_connection);
610601
Assert.Null(_management);
611-
// Skip.If(true, "rabbitmq-dotnet-client-87");
612602

613603
IConnection connection = await AmqpConnection.CreateAsync(
614604
ConnectionSettingBuilder.Create()

0 commit comments

Comments
 (0)