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

Disable two tests in ExprTests in DEBUG, non-NetFramework only - they fail due to StackOverflow exception on NetCore+DEBUG configuration.. #14637

Merged
merged 2 commits into from
Jan 23, 2023

Conversation

safesparrow
Copy link
Contributor

@safesparrow safesparrow commented Jan 20, 2023

These two tests fail due to StackOverflow on NetCore in DEBUG mode, because:

  • NetCore has a smaller stack by default than NetFramework
  • DEBUG does not optimise the expression traversal and generates very long stacktraces.

We use NUnit's Assert.Ignore to ignore tests dynamically, by calling this function:

let ignoreTestIfStackOverflowExpected () =
#if !NETFRAMEWORK && DEBUG
    Assert.Ignore("Test is known to fail in DEBUG when not using NetFramework. Use RELEASE configuration or NetFramework to run it.")
#else
    ()
#endif

With this change ./build -noVisualStudio -testCompilerService no longer fails on my machine.

Screenshot showing the tests being ignored in DEBUG NetCore, but not DEBUG NetFramework: image
And tests running in RELEASE: image

@safesparrow safesparrow changed the title Disable two tests in ExprTests in DEBUG mode only - they fail due to StackOverflow exception in NetCore. Disable two tests in ExprTests in DEBUG mode only - they fail due to StackOverflow exception on NetCore. Jan 20, 2023
@safesparrow safesparrow marked this pull request as ready for review January 20, 2023 22:24
@safesparrow safesparrow requested a review from a team as a code owner January 20, 2023 22:24
@safesparrow safesparrow changed the title Disable two tests in ExprTests in DEBUG mode only - they fail due to StackOverflow exception on NetCore. Disable two tests in ExprTests in DEBUG, non-NetFramework only - they fail due to StackOverflow exception on NetCore+DEBUG configuration.. Jan 21, 2023
@vzarytovskii vzarytovskii enabled auto-merge (squash) January 22, 2023 00:00
Copy link
Member

@psfinaki psfinaki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Learned something new today :) thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants