Skip to content

Commit 91986c3

Browse files
committed
Remove flaky download count assertion (#6932)
Address NuGet/Engineering#1952
1 parent 9e8a48f commit 91986c3

2 files changed

Lines changed: 0 additions & 35 deletions

File tree

tests/NuGetGallery.FunctionalTests.Core/Helpers/ClientSdkHelper.cs

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -575,37 +575,6 @@ public async Task VerifyVersionCountAsync(string packageId, int expectedVersionC
575575
}));
576576
}
577577

578-
/// <summary>
579-
/// Returns the download count of the given package as a formatted string as it would appear in the gallery UI.
580-
/// </summary>
581-
public static string GetFormattedDownLoadStatistics(string packageId)
582-
{
583-
var formattedCount = GetDownLoadStatistics(packageId).ToString("N1", CultureInfo.InvariantCulture);
584-
if (formattedCount.EndsWith(".0"))
585-
formattedCount = formattedCount.Remove(formattedCount.Length - 2);
586-
return formattedCount;
587-
}
588-
589-
/// <summary>
590-
/// Returns the download count of the given package.
591-
/// </summary>
592-
public static int GetDownLoadStatistics(string packageId)
593-
{
594-
var repo = PackageRepositoryFactory.Default.CreateRepository(SourceUrl);
595-
var package = repo.FindPackage(packageId);
596-
return package.DownloadCount;
597-
}
598-
599-
/// <summary>
600-
/// Returns the download count of the specific version of the package.
601-
/// </summary>
602-
public static int GetDownLoadStatisticsForPackageVersion(string packageId, string packageVersion)
603-
{
604-
var repo = PackageRepositoryFactory.Default.CreateRepository(SourceUrl);
605-
var package = repo.FindPackage(packageId, new NuGet.SemanticVersion(packageVersion));
606-
return package.DownloadCount;
607-
}
608-
609578
/// <summary>
610579
/// Searchs the gallery to get the packages matching the specific search term and returns their count.
611580
/// </summary>

tests/NuGetGallery.WebUITests.P1/BasicPages/PackagesPageTest.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ public override IEnumerator<WebTestRequest> GetRequestEnumerator()
2929
var packageTitleValidationRule = AssertAndValidationHelper.GetValidationRuleForFindText(packageId + " " + ClientSdkHelper.GetLatestStableVersion(packageId));
3030
packagePageRequest.ValidateResponse += packageTitleValidationRule.Validate;
3131

32-
// Rule to check that the download count is present in the response.
33-
var downloadCountValidationRule = AssertAndValidationHelper.GetValidationRuleForFindText(ClientSdkHelper.GetFormattedDownLoadStatistics(packageId));
34-
packagePageRequest.ValidateResponse += downloadCountValidationRule.Validate;
35-
3632
yield return packagePageRequest;
3733
}
3834
}

0 commit comments

Comments
 (0)