Guards the temporary files cleanup failure test to Windows only

This commit is contained in:
BinaryAlley committed 2026-09-05 03:52:20 -07:00
1 parent 315aed90f0
commit 8f41ca918b
1 file changed
+4
@@ -72,6 +72,10 @@ public class TemporaryFilesCleanupTaskExecutorTests
[Fact]
public async Task ExecutePayloadAsync_WhenDeletingTheDirectoryFails_ShouldReturnError()
{
// On non Windows platforms deleting a file that is locked open succeeds, so the failure path can only be forced on Windows.
if (!OperatingSystem.IsWindows())
return;
// Arrange
ScheduledJob scheduledJob = _scheduledJobFixture.Create();
string temporaryDirectory = Path.Combine(AppContext.BaseDirectory, "reading-cache");