Skip to content
Draft
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
6 changes: 5 additions & 1 deletion src/tests/GC/API/GC/Collect.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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");
Comment on lines +25 to +26
Comment on lines +24 to +26

if(((gen1==2) && (gen2==2)) || (gen2>gen1)) { // was already in gen 2!
Console.WriteLine("Test for GC.Collect() passed!");
return 100;
Expand Down
Loading