Skip to content

Commit a682307

Browse files
committed
Execute performance tests on VM
1 parent d888cd5 commit a682307

34 files changed

+444
-233
lines changed

WebJobs.Script.Tests.Perf.sln

Lines changed: 0 additions & 36 deletions
This file was deleted.

appveyor-perf.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

build.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,9 @@ foreach ($project in $projects)
259259
& dotnet $cmd
260260
}
261261

262+
$cmd = "pack", "tools\WebJobs.Script.Performance\WebJobs.Script.Performance.App\WebJobs.Script.Performance.App.csproj", "-o", "..\..\..\buildoutput"
263+
& dotnet $cmd
264+
262265
$bypassPackaging = $env:APPVEYOR_PULL_REQUEST_NUMBER -and -not $env:APPVEYOR_PULL_REQUEST_TITLE.Contains("[pack]")
263266

264267
if ($bypassPackaging){

test/WebJobs.Script.Tests.E2E.Shared/FunctionAppFixture.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,20 @@ public FunctionAppFixture()
3535

3636
FunctionDefaultKey = Settings.SiteFunctionKey ?? Guid.NewGuid().ToString().ToLower();
3737

38-
for (int i = 0; i < 5; i++)
38+
int attemptsCount = 5;
39+
for (int i = 0; i < attemptsCount; i++)
3940
{
4041
try
4142
{
4243
Initialize().Wait();
4344
return;
4445
}
45-
catch
46+
catch(Exception ex)
4647
{
4748
// Best effort.
4849
System.Threading.Thread.Sleep(5000);
50+
_logger.LogInformation($"Initialize error: {ex}");
51+
_logger.LogInformation($"Attempts {i+1} of {attemptsCount}");
4952
}
5053
}
5154

test/WebJobs.Script.Tests.E2E.Shared/Settings.cs

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ namespace WebJobs.Script.Tests.EndToEnd.Shared
1111
{
1212
public class Settings
1313
{
14+
private static string _runtimeExtensionPackageUrl;
15+
16+
private static IConfiguration Config = null;
17+
1418
public static string SiteTenantId => GetSettingValue(Constants.TargetSiteTenantIdSettingName);
1519

1620
public static string SiteClientSecret => GetSettingValue(Constants.TargetSiteClientSecretSettingName);
@@ -27,7 +31,19 @@ public class Settings
2731

2832
public static string SitePublishingPassword => GetSettingValue(Constants.TargetSitePublishingPasswordSettingName);
2933

30-
public static string RuntimeExtensionPackageUrl => GetSettingValue(Constants.RuntimeExtensionPackageUrlSettingName);
34+
35+
public static string RuntimeExtensionPackageUrl
36+
{
37+
get
38+
{
39+
return _runtimeExtensionPackageUrl ?? GetSettingValue(Constants.RuntimeExtensionPackageUrlSettingName);
40+
}
41+
set
42+
{
43+
_runtimeExtensionPackageUrl = value;
44+
}
45+
}
46+
3147

3248
public static string SiteMasterKey => GetSettingValue(Constants.TargetSiteMasterKey);
3349

@@ -37,8 +53,6 @@ public class Settings
3753

3854
public static Uri SiteBaseAddress => new Uri($"https://{SiteName}.azurewebsites.net");
3955

40-
private static IConfiguration Config = null;
41-
4256
public static string RuntimeVersion
4357
{
4458
get

test/WebJobs.Script.Tests.Perf/ThroughputTests.cs

Lines changed: 0 additions & 91 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)