Skip to content

Add triggering test for GC.AddMemoryPressure/GC.RemoveMemoryPressure #36796

Open
@AaronRobinsonMSFT

Description

@AaronRobinsonMSFT

The underlying GC.AddMemoryPressure/GC.RemoveMemoryPressure implementations were updated in #36767. The existing testing was questionable already and does nothing for this other algorithm. Deferring adding equivalent testing for now since this code path is not new but has been around since .NET Framework.

public bool StressTest()
{
TestCount++;
Console.WriteLine("StressTest Started...");
int gcCount1 = createDummies(true);
int gcCount2 = createDummies(false);
Console.WriteLine("{0} {1}", gcCount1, gcCount2);
if (gcCount1 > gcCount2)
{
Console.WriteLine("StressTest Passed");
Console.WriteLine();
return true;
}
Console.WriteLine("StressTest Failed");
Console.WriteLine();
return false;
}

/cc @VSadov

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-GC-coreclrhelp wanted[up-for-grabs] Good issue for external contributorsincrease-code-coverageTracking need to add more test and increase code coverage of a component

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions