Skip to content

Commit 270a708

Browse files
Update Jit Trace Integration Test (#8152) (#8162)
* Update Jit Trace Integration Test (#8152) * initial commit * Update common.props * removing threshold parameter * removing requirement for release branch for Release Verification Test * more information log * more descriptive log * fixing to be release only, adding other test to unit tests per Pragna * moving test back to JitPreparesTest * testing per-test release trait * moving to % of failures for windows and file size for Linux * Update common.props Testing theory. * Ok! They have to be different names! * Update common.props * Update common.props
1 parent 62b12de commit 270a708

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

build/common.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<LangVersion>latest</LangVersion>
66
<MajorVersion>3</MajorVersion>
77
<MinorVersion>5</MinorVersion>
8-
<PatchVersion>0</PatchVersion>
8+
<PatchVersion>1</PatchVersion>
99
<VersionPrefix>$(MajorVersion).$(MinorVersion).$(PatchVersion)</VersionPrefix>
1010
<Version Condition=" '$(BuildNumber)' != '' ">$(VersionPrefix)-$(BuildNumber)</Version>
1111
<Version Condition=" '$(Version)' == '' ">$(VersionPrefix)</Version>

test/WebJobs.Script.Tests.Integration/PreJIT/JitPreparesTest.cs

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,12 @@
1212
namespace Microsoft.Azure.WebJobs.Script.Tests.PreJIT
1313
{
1414
[Trait(TestTraits.Category, TestTraits.EndToEnd)]
15-
[Trait(TestTraits.Group, TestTraits.ReleaseTests)]
1615
public class JitPreparesTest
1716
{
1817
[Theory]
1918
[InlineData(WarmUpConstants.JitTraceFileName, 1.0)]
20-
[InlineData(WarmUpConstants.LinuxJitTraceFileName, 1.0)]
21-
public void ColdStart_JitFailuresTest(string fileName, double threshold)
19+
[Trait(TestTraits.Group, TestTraits.ReleaseTests)]
20+
public void ColdStart_JitFailuresTest_Windows(string fileName, double threshold)
2221
{
2322
var path = Path.Combine(Path.GetDirectoryName(new Uri(typeof(HostWarmupMiddleware).Assembly.CodeBase).LocalPath), WarmUpConstants.PreJitFolderName, fileName);
2423

@@ -33,5 +32,18 @@ public void ColdStart_JitFailuresTest(string fileName, double threshold)
3332
// using 1% as approximate number of allowed failures before we need to regenrate a new PGO file.
3433
Assert.True(failurePercentage < threshold, $"Number of failed PGOs are more than {threshold} percent! Current number of failures are {failedPrepares}. This will definitely impact cold start! Time to regenrate PGOs and update the {fileName} file!");
3534
}
35+
36+
[Theory]
37+
[InlineData(WarmUpConstants.LinuxJitTraceFileName)]
38+
public void ColdStart_JitFailuresTest_Linux(string fileName)
39+
{
40+
var path = Path.Combine(Path.GetDirectoryName(new Uri(typeof(HostWarmupMiddleware).Assembly.CodeBase).LocalPath), WarmUpConstants.PreJitFolderName, fileName);
41+
42+
var file = new FileInfo(path);
43+
44+
Assert.True(file.Exists, $"Expected PGO file '{file.FullName}' does not exist. The file was either renamed or deleted.");
45+
var lineCount = File.ReadAllLines(path).Length;
46+
Assert.True(lineCount > 6500, $"Jit Trace file line count of {lineCount} for {fileName} is less than 6500 lines! There is likely a bug removing lines from the linux trace.");
47+
}
3648
}
3749
}

0 commit comments

Comments
 (0)