Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed a bug in MessageRetryTracker.cs causing it to always return false
- Loading branch information
Showing
3 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using MassTransit.Transports; | ||
using NUnit.Framework; | ||
|
||
namespace MassTransit.Tests | ||
{ | ||
[TestFixture] | ||
public class MessageRetryTracker_Specs | ||
{ | ||
[Test] | ||
public void IsLimitExceeded_return_false_untill_specified_limit_reached() | ||
{ | ||
const int retryLimit = 5; | ||
|
||
var tracker = new MessageRetryTracker(retryLimit); | ||
const string id = "qelofjsw"; | ||
|
||
for (int i = 0; i < retryLimit; i++) | ||
{ | ||
Assert.IsFalse(tracker.IsRetryLimitExceeded(id)); | ||
tracker.IncrementRetryCount(id); | ||
} | ||
Assert.IsTrue(tracker.IsRetryLimitExceeded(id)); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters