Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Figure out why StackOverflowException on TeamCity is not a failure #2805

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions pwiz_tools/Skyline/TestFunctional/StackOverflowExceptionTest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
using System.Runtime.CompilerServices;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using pwiz.SkylineTestUtil;

namespace pwiz.SkylineTestFunctional
{
/// <summary>
/// Test which causes a StackOverflowException to be thrown, causing TestRunner.exe to exit immediately.
///
/// This test should not be merged into the master branch. The only purpose of this test is to make sure that TeamCity is properly able
/// to see that the tests have failed when this test is part of the suite.
/// </summary>
[TestClass]
public class StackOverflowExceptionTest : AbstractFunctionalTest
{
[TestMethod]
public void TestStackOverflowException()
{
RunFunctionalTest();
}

protected override void DoTest()
{
RunUI(()=>OverflowStack());
}

[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
private void OverflowStack()
{
OverflowStack();
}
}
}
1 change: 1 addition & 0 deletions pwiz_tools/Skyline/TestFunctional/TestFunctional.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@
<Compile Include="SaveAfterProteinAssociationTest.cs" />
<Compile Include="SelectSpectrumTest.cs" />
<Compile Include="SequenceTreeRatioTest.cs" />
<Compile Include="StackOverflowExceptionTest.cs" />
<Compile Include="SurrogateCalibrationCurveTest.cs" />
<Compile Include="TestPanoramaClient.cs" />
<Compile Include="SkydFileModifiedTest.cs" />
Expand Down