Skip to content

Commit

Permalink
Increment nested depth in TooDeepJsonDocument test by 10x (#105836)
Browse files Browse the repository at this point in the history
* Increment nested depth in TooDeepJsonDocument test by 10x

* Disable test on mono interpreter
  • Loading branch information
stephentoub authored Aug 8, 2024
1 parent 8a5f842 commit 63c6279
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,15 +229,15 @@ public static void DeepEquals_DeepJsonDocument(int depth)
Assert.True(JsonElement.DeepEquals(element, element));
}

[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported), nameof(PlatformDetection.IsNotMonoInterpreter))]
public static async Task DeepEquals_TooDeepJsonDocument_ThrowsInsufficientExecutionStackException()
{
var tcs = new TaskCompletionSource<bool>();
new Thread(() =>
{
try
{
using JsonDocument jDoc = CreateDeepJsonDocument(10_000);
using JsonDocument jDoc = CreateDeepJsonDocument(100_000);
JsonElement element = jDoc.RootElement;
Assert.Throws<InsufficientExecutionStackException>(() => JsonElement.DeepEquals(element, element));
tcs.SetResult(true);
Expand Down

0 comments on commit 63c6279

Please sign in to comment.