Skip to content

Commit

Permalink
fix mistake in test
Browse files Browse the repository at this point in the history
  • Loading branch information
alexalok committed Jan 2, 2024
1 parent 2676826 commit 0eb3576
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions dotWork.Tests/WorkHost_Tests.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
using dotWork.Tests.OptionsStubs;
using System;
using System.Threading;
using System.Threading.Tasks;
using dotWork.Tests.OptionsStubs;
using dotWork.Tests.TestExceptions;
using dotWork.Tests.WorkStubs;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging.Abstractions;
using Microsoft.Extensions.Options;
using Moq;
using System;
using System.Threading;
using System.Threading.Tasks;
using Xunit;

namespace dotWork.Tests
Expand Down Expand Up @@ -171,7 +171,8 @@ public async Task Skips_Delay_If_Requested_During_Delay_Between_Iterations()
TaskCompletionSource firstIterationFinishedTcs = new();
TaskCompletionSource secondIterationFinishedTcs = new();
CancellationTokenSource cts = new(TimeSpan.FromSeconds(1));
cts.Token.Register(secondIterationFinishedTcs.SetCanceled);
cts.Token.Register(() => firstIterationFinishedTcs.TrySetCanceled());
cts.Token.Register(() => secondIterationFinishedTcs.TrySetCanceled());
workHost.OnIterationFinished += async (_, e) =>
{
iterationsCount++;
Expand Down

0 comments on commit 0eb3576

Please sign in to comment.