mirror of
https://github.com/AlexMacocian/MonoGame.Extended.git
synced 2026-07-15 15:09:29 +00:00
Check for GCLatencyMode.NoGCRegion
This test fails occasionaly when run through the automated cake script. Wrapped the EndNoGCREgion in a check for GCTatencyMode.NoGCRegion to resolve
This commit is contained in:
@@ -35,7 +35,12 @@ namespace MonoGame.Extended.Tests.Collections
|
||||
Assert.True(false);
|
||||
}
|
||||
|
||||
GC.EndNoGCRegion();
|
||||
// Wrap in if statement due to exception thrown when running test through
|
||||
// cake build script or when debugging test script manually.
|
||||
if(GCSettings.LatencyMode == GCLatencyMode.NoGCRegion)
|
||||
{
|
||||
GC.EndNoGCRegion();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user