From f333196efe25d7e0f8abe65be8ef94c638912301 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sat, 10 Aug 2019 23:14:28 -0700 Subject: [PATCH] Retry up to 5 times for disk tests that sometimes fail --- src/NzbDrone.Common.Test/DiskTests/DiskProviderFixtureBase.cs | 3 +++ .../DiskTests/DiskTransferServiceFixture.cs | 1 + 2 files changed, 4 insertions(+) diff --git a/src/NzbDrone.Common.Test/DiskTests/DiskProviderFixtureBase.cs b/src/NzbDrone.Common.Test/DiskTests/DiskProviderFixtureBase.cs index 234be692c..76e6fae79 100644 --- a/src/NzbDrone.Common.Test/DiskTests/DiskProviderFixtureBase.cs +++ b/src/NzbDrone.Common.Test/DiskTests/DiskProviderFixtureBase.cs @@ -10,6 +10,7 @@ namespace NzbDrone.Common.Test.DiskTests public abstract class DiskProviderFixtureBase : TestBase where TSubject : class, IDiskProvider { [Test] + [Retry(5)] public void directory_exist_should_be_able_to_find_existing_folder() { Subject.FolderExists(TempFolder).Should().BeTrue(); @@ -43,6 +44,7 @@ public void FolderWritable_should_return_true_for_writable_directory() } [Test] + [Retry(5)] public void FolderWritable_should_return_false_for_unwritable_directory() { var tempFolder = GetTempFilePath(); @@ -122,6 +124,7 @@ public void should_be_able_to_delete_directory_with_read_only_file() } [Test] + [Retry(5)] public void empty_folder_should_return_folder_modified_date() { var tempfolder = new DirectoryInfo(TempFolder); diff --git a/src/NzbDrone.Common.Test/DiskTests/DiskTransferServiceFixture.cs b/src/NzbDrone.Common.Test/DiskTests/DiskTransferServiceFixture.cs index e8c942aa2..c85d65ded 100644 --- a/src/NzbDrone.Common.Test/DiskTests/DiskTransferServiceFixture.cs +++ b/src/NzbDrone.Common.Test/DiskTests/DiskTransferServiceFixture.cs @@ -616,6 +616,7 @@ public void mode_transactional_should_remove_partial_if_move_fails() } [Test] + [Retry(5)] public void CopyFolder_should_copy_folder() { WithRealDiskProvider();