Fixed: Disabled transactional file transfers since we don't want that feature in master yet.

pull/2/head
Taloth Saldono 9 years ago
parent bfa629f431
commit ada5919136

@ -30,6 +30,21 @@ namespace NzbDrone.Common.Test.DiskTests
}
[Test]
public void should_not_use_verified_transfer()
{
Subject.VerificationMode.Should().Be(DiskTransferVerificationMode.VerifyOnly);
var result = Subject.TransferFile(_sourcePath, _targetPath, TransferMode.Move);
Mocker.GetMock<IDiskProvider>()
.Verify(v => v.TryCreateHardLink(_sourcePath, _backupPath), Times.Never());
Mocker.GetMock<IDiskProvider>()
.Verify(v => v.MoveFile(_sourcePath, _targetPath, false), Times.Once());
}
[Test]
[Ignore("Disabled verified transfer temporarily.")]
public void should_use_verified_transfer_on_mono()
{
MonoOnly();
@ -38,6 +53,7 @@ namespace NzbDrone.Common.Test.DiskTests
}
[Test]
[Ignore("Disabled verified transfer temporarily.")]
public void should_not_use_verified_transfer_on_windows()
{
WindowsOnly();

@ -41,6 +41,9 @@ namespace NzbDrone.Common.Disk
// TODO: Atm we haven't seen partial transfers on windows so we disable verified transfer.
// (If enabled in the future, be sure to check specifically for ReFS, which doesn't support hardlinks.)
VerificationMode = OsInfo.IsWindows ? DiskTransferVerificationMode.VerifyOnly : DiskTransferVerificationMode.Transactional;
// TODO: Disabled the transactional logic entirely coz we have a couple of potential issues which we don't want in master.
VerificationMode = DiskTransferVerificationMode.VerifyOnly;
}
public TransferMode TransferFolder(String sourcePath, String targetPath, TransferMode mode, bool verified = true)

Loading…
Cancel
Save