Skip to content

Commit 69f9efb

Browse files
niemyjskiejsmith
authored andcommitted
Attempt to fix unit test
1 parent b525df6 commit 69f9efb

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/Exceptionless/Plugins/Default/1010_DuplicateCheckerPlugin.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public void Run(EventPluginContext context) {
5050
return;
5151
}
5252

53-
DateTimeOffset repeatWindow = DateTimeOffset.UtcNow.Subtract(_interval);
53+
var repeatWindow = DateTimeOffset.UtcNow.Subtract(_interval);
5454
if (_processed.Any(s => s.Item1 == hashCode && s.Item2 >= repeatWindow)) {
5555
context.Log.FormattedTrace(_logSourceType, "Adding duplicate event: {0} with hash: {1} to cache for later submission.", context.Event.Message, hashCode);
5656
// This event is a duplicate for the first time, lets save it so we can delay it while keeping count

test/Exceptionless.Tests/Plugins/PluginTests.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -844,8 +844,9 @@ public void VerifyDeduplicationMultithreaded() {
844844
duplicateCheckerPlugin.Run(context);
845845
});
846846

847-
while (!result.IsCompleted)
848-
Thread.Sleep(1);
847+
while (!result.IsCompleted) {
848+
Thread.Yield();
849+
}
849850
}
850851

851852
Thread.Sleep(150);

0 commit comments

Comments
 (0)