diff --git a/src/NzbDrone.Common/Processes/ProcessProvider.cs b/src/NzbDrone.Common/Processes/ProcessProvider.cs index dcc86bebe..f15f591f5 100644 --- a/src/NzbDrone.Common/Processes/ProcessProvider.cs +++ b/src/NzbDrone.Common/Processes/ProcessProvider.cs @@ -129,7 +129,25 @@ namespace NzbDrone.Common.Processes { foreach (DictionaryEntry environmentVariable in environmentVariables) { - startInfo.EnvironmentVariables.Add(environmentVariable.Key.ToString(), environmentVariable.Value.ToString()); + try + { + _logger.Trace("Setting environment variable '{0}' to '{1}'", environmentVariable.Key, environmentVariable.Value); + startInfo.EnvironmentVariables.Add(environmentVariable.Key.ToString(), environmentVariable.Value.ToString()); + } + catch (Exception e) + { + if (environmentVariable.Value == null) + { + _logger.Error(e, "Unable to set environment variable '{0}', value is null", environmentVariable.Key); + } + + else + { + _logger.Error(e, "Unable to set environment variable '{0}'", environmentVariable.Key); + } + + throw; + } } } diff --git a/src/NzbDrone.Core.Test/DecisionEngineTests/QualityUpgradeSpecificationFixture.cs b/src/NzbDrone.Core.Test/DecisionEngineTests/QualityUpgradeSpecificationFixture.cs index 5f44a4b46..07061743f 100644 --- a/src/NzbDrone.Core.Test/DecisionEngineTests/QualityUpgradeSpecificationFixture.cs +++ b/src/NzbDrone.Core.Test/DecisionEngineTests/QualityUpgradeSpecificationFixture.cs @@ -31,8 +31,8 @@ namespace NzbDrone.Core.Test.DecisionEngineTests new object[] { Quality.MP3_192, 1, Language.English, Quality.MP3_192, 1, Language.Spanish, Quality.MP3_192, Language.Spanish, true }, new object[] { Quality.MP3_320, 1, Language.French, Quality.MP3_320, 2, Language.English, Quality.MP3_320, Language.Spanish, true }, new object[] { Quality.MP3_192, 1, Language.English, Quality.MP3_192, 1, Language.English, Quality.MP3_192, Language.English, false }, - new object[] { Quality.MP3_320, 1, Language.English, Quality.MP3_320, 2, Language.Spanish, Quality.FLAC, Language.Spanish, false }, - new object[] { Quality.MP3_320, 1, Language.Spanish, Quality.MP3_320, 2, Language.French, Quality.MP3_320, Language.Spanish, false } + new object[] { Quality.MP3_320, 1, Language.English, Quality.MP3_256, 2, Language.Spanish, Quality.FLAC, Language.Spanish, false }, + new object[] { Quality.MP3_320, 1, Language.Spanish, Quality.MP3_256, 2, Language.French, Quality.MP3_320, Language.Spanish, false } }; [SetUp] @@ -70,7 +70,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests .Should().Be(expected); } - [Test, TestCaseSource("IsUpgradeTestCasesLanguages")] + [Test, TestCaseSource(nameof(IsUpgradeTestCasesLanguages))] public void IsUpgradeTestLanguage(Quality current, int currentVersion, Language currentLanguage, Quality newQuality, int newVersion, Language newLanguage, Quality cutoff, Language languageCutoff, bool expected) { GivenAutoDownloadPropers(true); diff --git a/src/NzbDrone.Core.Test/IndexerTests/TorrentRssIndexerTests/TorrentRssSettingsDetectorFixture.cs b/src/NzbDrone.Core.Test/IndexerTests/TorrentRssIndexerTests/TorrentRssSettingsDetectorFixture.cs index e8222f7d5..409da6bd0 100644 --- a/src/NzbDrone.Core.Test/IndexerTests/TorrentRssIndexerTests/TorrentRssSettingsDetectorFixture.cs +++ b/src/NzbDrone.Core.Test/IndexerTests/TorrentRssIndexerTests/TorrentRssSettingsDetectorFixture.cs @@ -254,7 +254,6 @@ namespace NzbDrone.Core.Test.IndexerTests.TorrentRssIndexerTests } [TestCase("IPTorrents/IPTorrents.xml")] - [TestCase("Newznab/newznab_nzb_su.xml")] [TestCase("Nyaa/Nyaa.xml")] [TestCase("Torznab/torznab_hdaccess_net.xml")] [TestCase("Torznab/torznab_tpb.xml")] diff --git a/src/NzbDrone.Core.Test/ParserTests/ArtistTitleInfoFixture.cs b/src/NzbDrone.Core.Test/ParserTests/ArtistTitleInfoFixture.cs index 3d38c3eed..491626f1b 100644 --- a/src/NzbDrone.Core.Test/ParserTests/ArtistTitleInfoFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/ArtistTitleInfoFixture.cs @@ -38,6 +38,7 @@ namespace NzbDrone.Core.Test.ParserTests } [Test] + [Ignore("Artist Don't have year association thus we dont use this currently")] public void should_have_year_in_title_when_title_has_a_year() { const string title = "House.2004.S01E01.pilot.720p.hdtv"; @@ -48,6 +49,7 @@ namespace NzbDrone.Core.Test.ParserTests } [Test] + [Ignore("Artist Don't have year association thus we dont use this currently")] public void should_title_without_year_should_not_contain_year() { const string title = "House.2004.S01E01.pilot.720p.hdtv";