Skip to content

Commit

Permalink
Test Broker Send Many using interlock
Browse files Browse the repository at this point in the history
The test appears to only run a single worker, but the increment count
values themselves still may need synchronization with the original test
thread.

Fixes Redth#896
  • Loading branch information
jroller-rjo committed Apr 11, 2019
1 parent d36b5f5 commit 9792046
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions PushSharp.Tests/BrokerTests.cs
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ public void Broker_Send_Many ()

var broker = new TestServiceBroker ();
broker.OnNotificationFailed += (notification, exception) => {
failed++;
Interlocked.Increment(ref failed);
};
broker.OnNotificationSucceeded += (notification) => {
succeeded++;
Interlocked.Increment(ref succeeded);
};
broker.Start ();
broker.ChangeScale (1);
Expand Down

0 comments on commit 9792046

Please sign in to comment.