Skip to content

Commit

Permalink
use default push internal in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
phnx47 committed Dec 13, 2024
1 parent 23d0f32 commit 99e0f73
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/MetricPushServerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ public class MetricPushServerTests
public async Task PushContinuesOnError()
{
var pusher = Substitute.For<IMetricPusher>();
pusher.PushAsync().Returns(Task.FromException(new Exception("Push error")));
pusher.PushAsync().Returns(Task.FromException(new Exception("Simulated Push Error")));

var worker = new MetricPushServer(pusher, TimeSpan.FromSeconds(0.05));
var worker = new MetricPushServer(pusher);
worker.Start();
await Task.Delay(150);
await Task.Delay(2500);

await pusher.Received(3).PushAsync();
worker.Stop();
Expand Down

0 comments on commit 99e0f73

Please sign in to comment.