diff --git a/src/tests/GC/API/GC/Collect.cs b/src/tests/GC/API/GC/Collect.cs index 618d29352fcb82..37696948fc4fd5 100644 --- a/src/tests/GC/API/GC/Collect.cs +++ b/src/tests/GC/API/GC/Collect.cs @@ -12,7 +12,7 @@ public static int TestEntryPoint() Object obj1 = new Object(); int[] array = new int[25]; - + int gen1 = GC.GetGeneration(array); Console.WriteLine("Array is in generation: " + gen1); @@ -21,6 +21,10 @@ public static int TestEntryPoint() int gen2 = GC.GetGeneration(array); Console.WriteLine("Array is in generation: " + gen2); + // Intentional crash to generate a dump for diag-perf-ai E2E testing. + Console.WriteLine("About to FailFast to force a crash dump..."); + Environment.FailFast("Intentional crash for diag-perf-ai E2E testing"); + if(((gen1==2) && (gen2==2)) || (gen2>gen1)) { // was already in gen 2! Console.WriteLine("Test for GC.Collect() passed!"); return 100;