Browse Source

Adjust performance test thresholds for GitHub Actions

pull/23316/head
maliming 7 months ago
parent
commit
41afa537d8
No known key found for this signature in database GPG Key ID: A646B9CB645ECEA4
  1. 13
      framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/AbpEfCoreNavigationHelper_Tests.cs

13
framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/AbpEfCoreNavigationHelper_Tests.cs

@ -22,17 +22,18 @@ public class AbpEfCoreNavigationHelper_Tests : EntityFrameworkCoreTestBase
[Fact]
public async Task Performance_Test()
{
if (!Environment.GetEnvironmentVariable("GITHUB_ACTIONS").IsNullOrWhiteSpace())
{
//Skipping this unit test due to insufficient performance on the Github CI machine.
return;
}
//These time taken varies on different machines.
//I used relatively large values, but it can also check for performance problem.
var batchUpdateTime = TimeSpan.FromSeconds(30);
var queryTime = TimeSpan.FromSeconds(10);
if (!Environment.GetEnvironmentVariable("GITHUB_ACTIONS").IsNullOrWhiteSpace())
{
batchUpdateTime = batchUpdateTime * 6;
queryTime = queryTime * 6;
}
var stopWatch = Stopwatch.StartNew();
await WithUnitOfWorkAsync(async () =>
{

Loading…
Cancel
Save