|
8 | 8 | using System.Threading.Tasks; |
9 | 9 | using RabbitMQ.AMQP.Client; |
10 | 10 | using RabbitMQ.AMQP.Client.Impl; |
| 11 | +using Xunit; |
11 | 12 | using Xunit.Abstractions; |
12 | 13 |
|
13 | 14 | namespace Tests; |
14 | 15 |
|
15 | | -using Xunit; |
16 | | - |
17 | 16 | internal class FakeBackOffDelayPolicyDisabled : IBackOffDelayPolicy |
18 | 17 | { |
19 | 18 | public int Delay() |
@@ -53,7 +52,7 @@ public class ConnectionRecoveryTests(ITestOutputHelper testOutputHelper) |
53 | 52 | /// The error _must_ be null when the connection is closed normally even the recovery is activated. |
54 | 53 | /// </summary> |
55 | 54 | /// <param name="activeRecovery"> If the recovery is enabled.</param> |
56 | | - [SkippableTheory] |
| 55 | + [Theory] |
57 | 56 | [InlineData(true)] |
58 | 57 | [InlineData(false)] |
59 | 58 | public async Task NormalCloseTheStatusShouldBeCorrectAndErrorNull(bool activeRecovery) |
@@ -103,12 +102,11 @@ public async Task NormalCloseTheStatusShouldBeCorrectAndErrorNull(bool activeRec |
103 | 102 | /// then the connection is closed normally. so the status should be: |
104 | 103 | /// - From Open to Closed |
105 | 104 | /// </summary> |
106 | | - [SkippableFact] |
| 105 | + [Fact] |
107 | 106 | public async Task UnexpectedCloseTheStatusShouldBeCorrectAndErrorNotNull() |
108 | 107 | { |
109 | 108 | Assert.Null(_connection); |
110 | 109 | Assert.Null(_management); |
111 | | - // Skip.If(true, "rabbitmq-dotnet-client-87"); |
112 | 110 |
|
113 | 111 | IConnection connection = await AmqpConnection.CreateAsync( |
114 | 112 | ConnectionSettingBuilder.Create().ContainerId(_containerId).RecoveryConfiguration( |
@@ -177,12 +175,11 @@ public async Task UnexpectedCloseTheStatusShouldBeCorrectAndErrorNotNull() |
177 | 175 | /// By default, the backoff is active it will be disabled after some failed attempts. |
178 | 176 | /// See the BackOffDelayPolicy class for more details. |
179 | 177 | /// </summary> |
180 | | - [SkippableFact] |
| 178 | + [Fact] |
181 | 179 | public async Task OverrideTheBackOffWithBackOffDisabled() |
182 | 180 | { |
183 | 181 | Assert.Null(_connection); |
184 | 182 | Assert.Null(_management); |
185 | | - // Skip.If(true, "rabbitmq-dotnet-client-87"); |
186 | 183 |
|
187 | 184 | IConnection connection = await AmqpConnection.CreateAsync( |
188 | 185 | ConnectionSettingBuilder.Create().ContainerId(_containerId).RecoveryConfiguration( |
@@ -241,12 +238,11 @@ public async Task OverrideTheBackOffWithBackOffDisabled() |
241 | 238 | /// When the topology-recover is Enabled the temp queues should be recovered. |
242 | 239 | /// the Queue is a temp queue with the Auto-Delete and Exclusive flag set to true. |
243 | 240 | /// </summary> |
244 | | - [SkippableFact] |
| 241 | + [Fact] |
245 | 242 | public async Task RecoveryTopologyShouldRecoverTheTempQueues() |
246 | 243 | { |
247 | 244 | Assert.Null(_connection); |
248 | 245 | Assert.Null(_management); |
249 | | - // Skip.If(true, "rabbitmq-dotnet-client-87"); |
250 | 246 |
|
251 | 247 | string queueName = $"temp-queue-should-recover-{true}"; |
252 | 248 | IConnection connection = await AmqpConnection.CreateAsync( |
@@ -290,12 +286,11 @@ public async Task RecoveryTopologyShouldRecoverTheTempQueues() |
290 | 286 | /// When the topology-recover is Disabled the temp queues should not be recovered. |
291 | 287 | /// the Queue is a temp queue with the Auto-Delete and Exclusive flag set to true. |
292 | 288 | /// </summary> |
293 | | - [SkippableFact] |
| 289 | + [Fact] |
294 | 290 | public async Task RecoveryTopologyShouldNotRecoverTheTempQueues() |
295 | 291 | { |
296 | 292 | Assert.Null(_connection); |
297 | 293 | Assert.Null(_management); |
298 | | - // Skip.If(true, "rabbitmq-dotnet-client-87"); |
299 | 294 |
|
300 | 295 | string queueName = $"temp-queue-should-recover-{false}"; |
301 | 296 | IConnection connection = await AmqpConnection.CreateAsync( |
@@ -328,14 +323,13 @@ public async Task RecoveryTopologyShouldNotRecoverTheTempQueues() |
328 | 323 | Assert.Equal(0, topologyListener.QueueCount()); |
329 | 324 | } |
330 | 325 |
|
331 | | - [SkippableTheory] |
| 326 | + [Theory] |
332 | 327 | [InlineData(true)] |
333 | 328 | [InlineData(false)] |
334 | 329 | public async Task RecoveryTopologyShouldRecoverExchanges(bool topologyEnabled) |
335 | 330 | { |
336 | 331 | Assert.Null(_connection); |
337 | 332 | Assert.Null(_management); |
338 | | - // Skip.If(true, "rabbitmq-dotnet-client-87"); |
339 | 333 |
|
340 | 334 | const string exchangeName = "exchange-should-recover"; |
341 | 335 | IConnection connection = await AmqpConnection.CreateAsync( |
@@ -388,14 +382,13 @@ public async Task RecoveryTopologyShouldRecoverExchanges(bool topologyEnabled) |
388 | 382 | connection.Dispose(); |
389 | 383 | } |
390 | 384 |
|
391 | | - [SkippableTheory] |
| 385 | + [Theory] |
392 | 386 | [InlineData(true)] |
393 | 387 | [InlineData(false)] |
394 | 388 | public async Task RecoveryTopologyShouldRecoverBindings(bool topologyEnabled) |
395 | 389 | { |
396 | 390 | Assert.Null(_connection); |
397 | 391 | Assert.Null(_management); |
398 | | - // Skip.If(true, "rabbitmq-dotnet-client-87"); |
399 | 392 |
|
400 | 393 | IConnection connection = await AmqpConnection.CreateAsync( |
401 | 394 | ConnectionSettingBuilder.Create() |
@@ -472,12 +465,11 @@ await SystemUtils.WaitUntilBindingsBetweenExchangeAndQueueDontExistAsync("exchan |
472 | 465 | /// |
473 | 466 | /// Only at the end the queue will be removed and bindings should be zero. |
474 | 467 | /// </summary> |
475 | | - [SkippableFact] |
| 468 | + [Fact] |
476 | 469 | public async Task RemoveAQueueShouldRemoveTheBindings() |
477 | 470 | { |
478 | 471 | Assert.Null(_connection); |
479 | 472 | Assert.Null(_management); |
480 | | - // Skip.If(true, "rabbitmq-dotnet-client-87"); |
481 | 473 |
|
482 | 474 | IConnection connection = await AmqpConnection.CreateAsync( |
483 | 475 | ConnectionSettingBuilder.Create() |
@@ -535,12 +527,11 @@ await SystemUtils.WaitUntilBindingsBetweenExchangeAndQueueDontExistAsync("e-remo |
535 | 527 | await connection.CloseAsync(); |
536 | 528 | } |
537 | 529 |
|
538 | | - [SkippableFact] |
| 530 | + [Fact] |
539 | 531 | public async Task RemoveAnExchangeShouldRemoveTheBindings() |
540 | 532 | { |
541 | 533 | Assert.Null(_connection); |
542 | 534 | Assert.Null(_management); |
543 | | - // Skip.If(true, "rabbitmq-dotnet-client-87"); |
544 | 535 |
|
545 | 536 | IConnection connection = await AmqpConnection.CreateAsync( |
546 | 537 | ConnectionSettingBuilder.Create() |
@@ -603,12 +594,11 @@ await SystemUtils.WaitUntilBindingsBetweenExchangeAndQueueDontExistAsync( |
603 | 594 | /// <summary> |
604 | 595 | /// This test is specific to check if the bindings are removed when a destination exchange is removed. |
605 | 596 | /// </summary> |
606 | | - [SkippableFact] |
| 597 | + [Fact] |
607 | 598 | public async Task RemoveAnExchangeBoundToAnotherExchangeShouldRemoveTheBindings() |
608 | 599 | { |
609 | 600 | Assert.Null(_connection); |
610 | 601 | Assert.Null(_management); |
611 | | - // Skip.If(true, "rabbitmq-dotnet-client-87"); |
612 | 602 |
|
613 | 603 | IConnection connection = await AmqpConnection.CreateAsync( |
614 | 604 | ConnectionSettingBuilder.Create() |
|
0 commit comments