From 9e7571c77d12acac98828ce93a650cddff437d5b Mon Sep 17 00:00:00 2001 From: Svetlana Kofman Date: Tue, 26 Mar 2019 16:13:20 -0700 Subject: [PATCH 1/2] Merge dev to master (#734) * Change the name of the Validation.Symbols to Validation.Symbols.Job. (#733) * Embed packagetranslation.json in Assembly (#732) --- NuGet.Jobs.sln | 2 +- build.ps1 | 2 +- .../ImportAzureCdnStatisticsJob.cs | 2 +- .../PackageTranslator.cs | 18 ++++++++++++------ .../Properties/AssemblyInfo.cs | 9 ++++++++- .../Stats.ImportAzureCdnStatistics.csproj | 6 +++--- .../Scripts/Validation.SymbolValidation.cmd | 2 +- ...ls.csproj => Validation.Symbols.Job.csproj} | 6 ++++-- ...ls.nuspec => Validation.Symbols.Job.nuspec} | 2 +- .../LogFileProcessorFacts.cs | 3 +-- .../PackageStatisticsParserFacts.cs | 2 +- .../PackageTranslatorFacts.cs | 2 +- .../TestablePackageTranslator.cs | 17 +++++++++++++++++ ...Tests.Stats.ImportAzureCdnStatistics.csproj | 7 ++++--- .../Validation.Symbols.Tests.csproj | 4 ++-- 15 files changed, 58 insertions(+), 26 deletions(-) rename src/Validation.Symbols/{Validation.Symbols.csproj => Validation.Symbols.Job.csproj} (97%) rename src/Validation.Symbols/{Validation.Symbols.nuspec => Validation.Symbols.Job.nuspec} (94%) create mode 100644 tests/Tests.Stats.ImportAzureCdnStatistics/TestablePackageTranslator.cs diff --git a/NuGet.Jobs.sln b/NuGet.Jobs.sln index 62d27a47b..143daff15 100644 --- a/NuGet.Jobs.sln +++ b/NuGet.Jobs.sln @@ -133,7 +133,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Monitoring.RebootSearchInst EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Monitoring.RebootSearchInstance.Tests", "tests\Monitoring.RebootSearchInstance.Tests\Monitoring.RebootSearchInstance.Tests.csproj", "{21C0A0EE-8696-4013-950F-D6495D0C6E40}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Validation.Symbols", "src\Validation.Symbols\Validation.Symbols.csproj", "{2DD07A73-8C88-4429-BB24-C2813586EF92}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Validation.Symbols.Job", "src\Validation.Symbols\Validation.Symbols.Job.csproj", "{2DD07A73-8C88-4429-BB24-C2813586EF92}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Validation.Symbols.Tests", "tests\Validation.Symbols.Tests\Validation.Symbols.Tests.csproj", "{640D29AB-4D1B-4FC7-AE67-AD12EE5AC503}" EndProject diff --git a/build.ps1 b/build.ps1 index 714fcad3e..3be06f35d 100644 --- a/build.ps1 +++ b/build.ps1 @@ -162,7 +162,7 @@ Invoke-BuildStep 'Creating artifacts' { "src/Monitoring.RebootSearchInstance/Monitoring.RebootSearchInstance.csproj", ` "src/StatusAggregator/StatusAggregator.csproj", ` "src/Validation.Symbols.Core/Validation.Symbols.Core.csproj", ` - "src/Validation.Symbols/Validation.Symbols.csproj" + "src/Validation.Symbols/Validation.Symbols.Job.csproj" Foreach ($Project in $NuspecProjects) { New-Package (Join-Path $PSScriptRoot "$Project") -Configuration $Configuration -BuildNumber $BuildNumber -Version $SemanticVersion -Branch $Branch -MSBuildVersion "$msBuildVersion" diff --git a/src/Stats.ImportAzureCdnStatistics/ImportAzureCdnStatisticsJob.cs b/src/Stats.ImportAzureCdnStatistics/ImportAzureCdnStatisticsJob.cs index e84411e76..5f762f849 100644 --- a/src/Stats.ImportAzureCdnStatistics/ImportAzureCdnStatisticsJob.cs +++ b/src/Stats.ImportAzureCdnStatistics/ImportAzureCdnStatisticsJob.cs @@ -81,7 +81,7 @@ public override async Task Run() var leasedLogFiles = await _blobLeaseManager.LeaseNextLogFilesToBeProcessedAsync(prefix, alreadyAggregatedLogFiles); foreach (var leasedLogFile in leasedLogFiles) { - var packageTranslator = new PackageTranslator("packagetranslations.json"); + var packageTranslator = new PackageTranslator(); var packageStatisticsParser = new PackageStatisticsParser(packageTranslator, LoggerFactory); await logProcessor.ProcessLogFileAsync(leasedLogFile, packageStatisticsParser, _configuration.AggregatesOnly); diff --git a/src/Stats.ImportAzureCdnStatistics/PackageTranslator.cs b/src/Stats.ImportAzureCdnStatistics/PackageTranslator.cs index 595f76bec..e38533cd9 100644 --- a/src/Stats.ImportAzureCdnStatistics/PackageTranslator.cs +++ b/src/Stats.ImportAzureCdnStatistics/PackageTranslator.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.IO; +using System.Reflection; using System.Text.RegularExpressions; using Newtonsoft.Json.Linq; @@ -14,16 +15,16 @@ public class PackageTranslator private readonly Dictionary> _packageTranslations = new Dictionary>(StringComparer.OrdinalIgnoreCase); - public PackageTranslator(string packageTranslationsJsonPath) + public PackageTranslator() { - if (!File.Exists(packageTranslationsJsonPath)) + JObject packageTranslationsJson; + + using (var stream = GetPackageTranslationsStream()) + using (var reader = new StreamReader(stream)) { - throw new FileNotFoundException("Could not find file.", packageTranslationsJsonPath); + packageTranslationsJson = JObject.Parse(reader.ReadToEnd()); } - var packageTranslationsJson = JObject.Parse( - File.ReadAllText(packageTranslationsJsonPath)); - var packageTranslationsArray = (JArray) packageTranslationsJson["translations"]; foreach (var packageTranslationJson in packageTranslationsArray.Children()) { @@ -72,5 +73,10 @@ public bool TryTranslatePackageDefinition(PackageDefinition packageDefinition) return translateOccurred; } + + internal virtual Stream GetPackageTranslationsStream() + { + return Assembly.GetExecutingAssembly().GetManifestResourceStream("packagetranslations.json"); + } } } \ No newline at end of file diff --git a/src/Stats.ImportAzureCdnStatistics/Properties/AssemblyInfo.cs b/src/Stats.ImportAzureCdnStatistics/Properties/AssemblyInfo.cs index b586b021f..a6def1406 100644 --- a/src/Stats.ImportAzureCdnStatistics/Properties/AssemblyInfo.cs +++ b/src/Stats.ImportAzureCdnStatistics/Properties/AssemblyInfo.cs @@ -2,6 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Reflection; +using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Stats.ImportAzureCdnStatistics")] @@ -15,4 +16,10 @@ [assembly: ComVisible(false)] [assembly: Guid("5b0d3ec6-4326-47a7-aee1-cc67d07d5c84")] [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file +[assembly: AssemblyFileVersion("1.0.0.0")] + +#if SIGNED_BUILD +[assembly: InternalsVisibleTo("Tests.Stats.ImportAzureCdnStatistics, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +#else +[assembly: InternalsVisibleTo("Tests.Stats.ImportAzureCdnStatistics")] +#endif \ No newline at end of file diff --git a/src/Stats.ImportAzureCdnStatistics/Stats.ImportAzureCdnStatistics.csproj b/src/Stats.ImportAzureCdnStatistics/Stats.ImportAzureCdnStatistics.csproj index c27b0eae8..ca430c87d 100644 --- a/src/Stats.ImportAzureCdnStatistics/Stats.ImportAzureCdnStatistics.csproj +++ b/src/Stats.ImportAzureCdnStatistics/Stats.ImportAzureCdnStatistics.csproj @@ -88,9 +88,9 @@ knownclients.yaml - - Always - + + packagetranslations.json + diff --git a/src/Validation.Symbols/Scripts/Validation.SymbolValidation.cmd b/src/Validation.Symbols/Scripts/Validation.SymbolValidation.cmd index 45ad9e4ec..904d9ec58 100644 --- a/src/Validation.Symbols/Scripts/Validation.SymbolValidation.cmd +++ b/src/Validation.Symbols/Scripts/Validation.SymbolValidation.cmd @@ -7,7 +7,7 @@ echo "Starting job - #{Jobs.Validation.Symbols.Title}" title #{Jobs.Validation.Symbols.Title} -start /w Validation.Symbols.exe ^ +start /w Validation.Symbols.Job.exe ^ -Configuration #{Jobs.validation.SymbolValidation.Configuration} ^ -InstrumentationKey "#{Jobs.validation.SymbolValidation.InstrumentationKey}" diff --git a/src/Validation.Symbols/Validation.Symbols.csproj b/src/Validation.Symbols/Validation.Symbols.Job.csproj similarity index 97% rename from src/Validation.Symbols/Validation.Symbols.csproj rename to src/Validation.Symbols/Validation.Symbols.Job.csproj index f5be78935..745f47df6 100644 --- a/src/Validation.Symbols/Validation.Symbols.csproj +++ b/src/Validation.Symbols/Validation.Symbols.Job.csproj @@ -7,7 +7,7 @@ {2DD07A73-8C88-4429-BB24-C2813586EF92} Exe Validation.Symbols - Validation.Symbols + Validation.Symbols.Job v4.6.2 512 true @@ -65,7 +65,9 @@ - + + Designer + diff --git a/src/Validation.Symbols/Validation.Symbols.nuspec b/src/Validation.Symbols/Validation.Symbols.Job.nuspec similarity index 94% rename from src/Validation.Symbols/Validation.Symbols.nuspec rename to src/Validation.Symbols/Validation.Symbols.Job.nuspec index 0915ba152..b37bb2b69 100644 --- a/src/Validation.Symbols/Validation.Symbols.nuspec +++ b/src/Validation.Symbols/Validation.Symbols.Job.nuspec @@ -1,7 +1,7 @@ - Validation.Symbols + Validation.Symbols.Job $version$ Validation.Symbols .NET Foundation diff --git a/tests/Tests.Stats.ImportAzureCdnStatistics/LogFileProcessorFacts.cs b/tests/Tests.Stats.ImportAzureCdnStatistics/LogFileProcessorFacts.cs index 07efbe7a7..440b28504 100644 --- a/tests/Tests.Stats.ImportAzureCdnStatistics/LogFileProcessorFacts.cs +++ b/tests/Tests.Stats.ImportAzureCdnStatistics/LogFileProcessorFacts.cs @@ -20,8 +20,7 @@ public class LogFileProcessorFacts private static readonly Assembly _currentAssembly = typeof(LogFileProcessorFacts).Assembly; - private static readonly PackageTranslator _packageTranslator = - new PackageTranslator("packageTranslations.json"); + private static readonly PackageTranslator _packageTranslator = new PackageTranslator(); private static readonly IPackageStatisticsParser _packageStatisticsParser = new PackageStatisticsParser(_packageTranslator, new LoggerFactory()); diff --git a/tests/Tests.Stats.ImportAzureCdnStatistics/PackageStatisticsParserFacts.cs b/tests/Tests.Stats.ImportAzureCdnStatistics/PackageStatisticsParserFacts.cs index b184a11ba..1b7206dca 100644 --- a/tests/Tests.Stats.ImportAzureCdnStatistics/PackageStatisticsParserFacts.cs +++ b/tests/Tests.Stats.ImportAzureCdnStatistics/PackageStatisticsParserFacts.cs @@ -43,7 +43,7 @@ public void TranslatesPackagesCorrectly(string packageId, string packageVersion) // Arrange var logEntry = GetCdnLogEntry($"http://test.me/{packageId}.{packageVersion}.nupkg"); - var translator = new PackageTranslator("packagetranslations.json"); + var translator = new TestablePackageTranslator(); var statsParser = new PackageStatisticsParser(translator, new LoggerFactory()); // Act diff --git a/tests/Tests.Stats.ImportAzureCdnStatistics/PackageTranslatorFacts.cs b/tests/Tests.Stats.ImportAzureCdnStatistics/PackageTranslatorFacts.cs index 2fa5bebcb..f580c3bbe 100644 --- a/tests/Tests.Stats.ImportAzureCdnStatistics/PackageTranslatorFacts.cs +++ b/tests/Tests.Stats.ImportAzureCdnStatistics/PackageTranslatorFacts.cs @@ -10,7 +10,7 @@ public class PackageTranslatorFacts { private static PackageTranslator CreatePackageTranslator() { - return new PackageTranslator("packagetranslations.json"); + return new TestablePackageTranslator(); } [Fact] diff --git a/tests/Tests.Stats.ImportAzureCdnStatistics/TestablePackageTranslator.cs b/tests/Tests.Stats.ImportAzureCdnStatistics/TestablePackageTranslator.cs new file mode 100644 index 000000000..a31b57ee3 --- /dev/null +++ b/tests/Tests.Stats.ImportAzureCdnStatistics/TestablePackageTranslator.cs @@ -0,0 +1,17 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Stats.ImportAzureCdnStatistics; +using System.IO; +using System.Reflection; + +namespace Tests.Stats.ImportAzureCdnStatistics +{ + public class TestablePackageTranslator : PackageTranslator + { + internal override Stream GetPackageTranslationsStream() + { + return Assembly.GetExecutingAssembly().GetManifestResourceStream("packagetranslations.json"); + } + } +} diff --git a/tests/Tests.Stats.ImportAzureCdnStatistics/Tests.Stats.ImportAzureCdnStatistics.csproj b/tests/Tests.Stats.ImportAzureCdnStatistics/Tests.Stats.ImportAzureCdnStatistics.csproj index f03d6fbca..ea10a18fc 100644 --- a/tests/Tests.Stats.ImportAzureCdnStatistics/Tests.Stats.ImportAzureCdnStatistics.csproj +++ b/tests/Tests.Stats.ImportAzureCdnStatistics/Tests.Stats.ImportAzureCdnStatistics.csproj @@ -54,6 +54,7 @@ + @@ -67,9 +68,9 @@ Always - - Always - + + packagetranslations.json + diff --git a/tests/Validation.Symbols.Tests/Validation.Symbols.Tests.csproj b/tests/Validation.Symbols.Tests/Validation.Symbols.Tests.csproj index 4c004caaa..e12ab47bc 100644 --- a/tests/Validation.Symbols.Tests/Validation.Symbols.Tests.csproj +++ b/tests/Validation.Symbols.Tests/Validation.Symbols.Tests.csproj @@ -77,9 +77,9 @@ {17510a22-176f-4e96-a867-e79f1b54f54f} Validation.Symbols.Core - + {2dd07a73-8c88-4429-bb24-c2813586ef92} - Validation.Symbols + Validation.Symbols.Job From b0fd20f82b330d5fd1c27598a9c91e14af8acbaa Mon Sep 17 00:00:00 2001 From: Joel Verhagen Date: Thu, 28 Mar 2019 08:39:12 -0700 Subject: [PATCH 2/2] Allow the SQL command timeout to be configured in Search.GenerateAuxiliaryData (#736) Progress on https://github.com/NuGet/Engineering/issues/2327 --- .../Configuration/InitializationConfiguration.cs | 4 ++++ src/Search.GenerateAuxiliaryData/Job.cs | 9 ++++++--- .../NestedJArrayExporter.cs | 8 ++++++-- src/Search.GenerateAuxiliaryData/RankingsExporter.cs | 6 +++--- src/Search.GenerateAuxiliaryData/SqlExporter.cs | 11 ++++++++--- .../VerifiedPackagesExporter.cs | 6 +++--- .../RankingsExporterTests.cs | 3 ++- .../VerifiedPackagesExporterTests.cs | 3 ++- 8 files changed, 34 insertions(+), 16 deletions(-) diff --git a/src/Search.GenerateAuxiliaryData/Configuration/InitializationConfiguration.cs b/src/Search.GenerateAuxiliaryData/Configuration/InitializationConfiguration.cs index 1ff142b10..34dacc9e4 100644 --- a/src/Search.GenerateAuxiliaryData/Configuration/InitializationConfiguration.cs +++ b/src/Search.GenerateAuxiliaryData/Configuration/InitializationConfiguration.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +using System; + namespace Search.GenerateAuxiliaryData { public class InitializationConfiguration @@ -12,5 +14,7 @@ public class InitializationConfiguration public string PrimaryDestination { get; set; } public string DestinationContainerName { get; set; } + + public TimeSpan SqlCommandTimeout { get; set; } = TimeSpan.FromMinutes(1); } } diff --git a/src/Search.GenerateAuxiliaryData/Job.cs b/src/Search.GenerateAuxiliaryData/Job.cs index a78fea2a1..036a5fb9e 100644 --- a/src/Search.GenerateAuxiliaryData/Job.cs +++ b/src/Search.GenerateAuxiliaryData/Job.cs @@ -58,7 +58,8 @@ public override void Init(IServiceContainer serviceContainer, IDictionary, destinationContainer, ScriptVerifiedPackages, - OutputNameVerifiedPackages), + OutputNameVerifiedPackages, + Configuration.SqlCommandTimeout), new NestedJArrayExporter( LoggerFactory.CreateLogger(), @@ -67,14 +68,16 @@ public override void Init(IServiceContainer serviceContainer, IDictionary(), OpenSqlConnectionAsync, destinationContainer, ScriptRankingsTotal, - OutputNameRankings), + OutputNameRankings, + Configuration.SqlCommandTimeout), new BlobStorageExporter( LoggerFactory.CreateLogger(), diff --git a/src/Search.GenerateAuxiliaryData/NestedJArrayExporter.cs b/src/Search.GenerateAuxiliaryData/NestedJArrayExporter.cs index 8d2b8232b..9acc88d51 100644 --- a/src/Search.GenerateAuxiliaryData/NestedJArrayExporter.cs +++ b/src/Search.GenerateAuxiliaryData/NestedJArrayExporter.cs @@ -23,8 +23,12 @@ public NestedJArrayExporter( ILogger logger, Func> openSqlConnectionAsync, CloudBlobContainer defaultDestinationContainer, - string defaultSqlScript, string defaultName, string defaultCol0, string defaultCol1) - : base(logger, openSqlConnectionAsync, defaultDestinationContainer, defaultName) + string defaultSqlScript, + string defaultName, + string defaultCol0, + string defaultCol1, + TimeSpan commandTimeout) + : base(logger, openSqlConnectionAsync, defaultDestinationContainer, defaultName, commandTimeout) { Col0 = defaultCol0; Col1 = defaultCol1; diff --git a/src/Search.GenerateAuxiliaryData/RankingsExporter.cs b/src/Search.GenerateAuxiliaryData/RankingsExporter.cs index eb418c944..9aa89fa7d 100644 --- a/src/Search.GenerateAuxiliaryData/RankingsExporter.cs +++ b/src/Search.GenerateAuxiliaryData/RankingsExporter.cs @@ -24,8 +24,9 @@ public RankingsExporter( Func> openSqlConnectionAsync, CloudBlobContainer defaultDestinationContainer, string defaultRankingsScript, - string defaultName) - : base(logger, openSqlConnectionAsync, defaultDestinationContainer, defaultName) + string defaultName, + TimeSpan commandTimeout) + : base(logger, openSqlConnectionAsync, defaultDestinationContainer, defaultName, commandTimeout) { _rankingsTotalScript = defaultRankingsScript; } @@ -34,7 +35,6 @@ protected override JContainer GetResultOfQuery(SqlConnection connection) { var rankingsTotalCommand = GetEmbeddedSqlCommand(connection, _rankingsTotalScript); rankingsTotalCommand.Parameters.AddWithValue(_rankingCountParameterName, _rankingCount); - rankingsTotalCommand.CommandTimeout = 60; return GetRankings(rankingsTotalCommand.ExecuteReader()); } diff --git a/src/Search.GenerateAuxiliaryData/SqlExporter.cs b/src/Search.GenerateAuxiliaryData/SqlExporter.cs index 1a0b77b56..9ec40c83e 100644 --- a/src/Search.GenerateAuxiliaryData/SqlExporter.cs +++ b/src/Search.GenerateAuxiliaryData/SqlExporter.cs @@ -24,19 +24,23 @@ public abstract class SqlExporter : Exporter private Func> OpenSqlConnectionAsync { get; } + private readonly TimeSpan _commandTimeout; + public SqlExporter( ILogger logger, Func> openSqlConnectionAsync, CloudBlobContainer defaultDestinationContainer, - string defaultName) + string defaultName, + TimeSpan commandTimeout) : base(logger, defaultDestinationContainer, defaultName) { _logger = logger; OpenSqlConnectionAsync = openSqlConnectionAsync; + _commandTimeout = commandTimeout; } [SuppressMessage("Microsoft.Security", "CA2100", Justification = "Query string comes from embedded resource, not user input.")] - protected static SqlCommand GetEmbeddedSqlCommand(SqlConnection connection, string resourceName) + protected SqlCommand GetEmbeddedSqlCommand(SqlConnection connection, string resourceName) { using (var reader = new StreamReader(_executingAssembly.GetManifestResourceStream(_assemblyName + "." + resourceName))) { @@ -44,7 +48,8 @@ protected static SqlCommand GetEmbeddedSqlCommand(SqlConnection connection, stri return new SqlCommand(commandText, connection) { - CommandType = CommandType.Text + CommandType = CommandType.Text, + CommandTimeout = (int)_commandTimeout.TotalSeconds, }; } } diff --git a/src/Search.GenerateAuxiliaryData/VerifiedPackagesExporter.cs b/src/Search.GenerateAuxiliaryData/VerifiedPackagesExporter.cs index 95c4091bd..8a9287824 100644 --- a/src/Search.GenerateAuxiliaryData/VerifiedPackagesExporter.cs +++ b/src/Search.GenerateAuxiliaryData/VerifiedPackagesExporter.cs @@ -21,8 +21,9 @@ public VerifiedPackagesExporter( Func> openSqlConnectionAsync, CloudBlobContainer defaultDestinationContainer, string defaultVerifiedPackagesScript, - string defaultName) - : base(logger, openSqlConnectionAsync, defaultDestinationContainer, defaultName) + string defaultName, + TimeSpan commandTimeout) + : base(logger, openSqlConnectionAsync, defaultDestinationContainer, defaultName, commandTimeout) { _verifiedPackagesScript = defaultVerifiedPackagesScript; } @@ -30,7 +31,6 @@ public VerifiedPackagesExporter( protected override JContainer GetResultOfQuery(SqlConnection connection) { var verifiedPackagesCommand = GetEmbeddedSqlCommand(connection, _verifiedPackagesScript); - verifiedPackagesCommand.CommandTimeout = 60; SqlDataReader reader = null; diff --git a/tests/Tests.Search.GenerateAuxiliaryData/RankingsExporterTests.cs b/tests/Tests.Search.GenerateAuxiliaryData/RankingsExporterTests.cs index b3386ccad..5af9712ab 100644 --- a/tests/Tests.Search.GenerateAuxiliaryData/RankingsExporterTests.cs +++ b/tests/Tests.Search.GenerateAuxiliaryData/RankingsExporterTests.cs @@ -47,7 +47,8 @@ private static RankingsExporter CreateExporter() openSqlConnectionAsync: () => null, defaultDestinationContainer: new CloudBlobContainer(new Uri("https://nuget.org")), defaultRankingsScript: "b", - defaultName: "c"); + defaultName: "c", + commandTimeout: TimeSpan.FromSeconds(10)); } } } \ No newline at end of file diff --git a/tests/Tests.Search.GenerateAuxiliaryData/VerifiedPackagesExporterTests.cs b/tests/Tests.Search.GenerateAuxiliaryData/VerifiedPackagesExporterTests.cs index a16001b10..4b884844e 100644 --- a/tests/Tests.Search.GenerateAuxiliaryData/VerifiedPackagesExporterTests.cs +++ b/tests/Tests.Search.GenerateAuxiliaryData/VerifiedPackagesExporterTests.cs @@ -46,7 +46,8 @@ private static VerifiedPackagesExporter CreateExporter() openSqlConnectionAsync: () => null, defaultDestinationContainer: new CloudBlobContainer(new Uri("https://nuget.org")), defaultVerifiedPackagesScript: "b", - defaultName: "c"); + defaultName: "c", + commandTimeout: TimeSpan.FromSeconds(10)); } } } \ No newline at end of file