Try to make MonitoringIsEnabled more stable (dotnet/corefx#38651)
authorStephen Toub <stoub@microsoft.com>
Tue, 18 Jun 2019 22:08:20 +0000 (18:08 -0400)
committerGitHub <noreply@github.com>
Tue, 18 Jun 2019 22:08:20 +0000 (18:08 -0400)
commit312caa957410a4b65f38ae028719dd11f7632912
treeda5a799de79e6b37f68ef5727da4a5dcda6701d3
parent958ead90548b10cdd8ec15bafc0f4ec3ec6ba489
Try to make MonitoringIsEnabled more stable (dotnet/corefx#38651)

Add a GC.Collect call to ensure the GC.GetMemoryInfo sees the object being kept alive.

Commit migrated from https://github.com/dotnet/corefx/commit/471edf259604905535f147ddfb2c8fe5a37ce81d
src/libraries/System.Runtime.Extensions/tests/System/AppDomainTests.cs