Skip to content

Commit

Permalink
used dispatcher instead of delay
Browse files Browse the repository at this point in the history
  • Loading branch information
ugras-ergun-sonarsource committed Nov 15, 2023
1 parent ec72f18 commit f70e2e8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Core.UnitTests/GitEventsMonitorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
using System;
using System.IO.Abstractions;
using System.Threading.Tasks;
using System.Windows.Threading;
using FluentAssertions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
Expand All @@ -47,7 +48,7 @@ public void HeadChanged_EventInvoked()

fileSystemWatcher.Raise(w => w.Renamed += null, null, null);

Task.Delay(10).Wait();
Dispatcher.CurrentDispatcher.Invoke(() => { }); // Force thread dispatcher to process other threads

counter.Should().Be(1);
}
Expand Down

0 comments on commit f70e2e8

Please sign in to comment.