Skip to content

Commit

Permalink
Ignoring failures due to the test machine insufficient memory (#73173)
Browse files Browse the repository at this point in the history
  • Loading branch information
cshung committed Aug 3, 2022
1 parent 687a353 commit 197ae4c
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/tests/GC/LargeMemory/API/gc/collect.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ private bool collectLargeObject(int gen) {
CreateLargeObject();
} catch (OutOfMemoryException) {
Console.WriteLine("Large Memory Machine required");
return false;
return true;
} catch (Exception e) {
Console.WriteLine("Unexpected Exception:");
Console.WriteLine(e);
Expand Down
4 changes: 2 additions & 2 deletions src/tests/GC/LargeMemory/API/gc/getgeneration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ private bool getGenerationWR() {
gen = GC.GetGeneration(new WeakReference(new LargeObject(size)));
} catch (OutOfMemoryException) {
Console.WriteLine("Large Memory Machine required");
return false;
return true;
} catch (Exception e) {
Console.WriteLine("Unexpected Exception:");
Console.WriteLine(e);
Expand Down Expand Up @@ -45,7 +45,7 @@ private bool getGeneration() {

} catch (OutOfMemoryException) {
Console.WriteLine("Large Memory Machine required");
return false;
return true;
} catch (Exception e) {
Console.WriteLine("Unexpected Exception:");
Console.WriteLine(e);
Expand Down
2 changes: 1 addition & 1 deletion src/tests/GC/LargeMemory/API/gc/gettotalmemory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public bool RunTests() {

} catch (OutOfMemoryException) {
Console.WriteLine("Large Memory Machine required");
return false;
return true;
} catch (Exception e) {
Console.WriteLine("Unexpected Exception:");
Console.WriteLine(e);
Expand Down
2 changes: 1 addition & 1 deletion src/tests/GC/LargeMemory/API/gc/keepalive.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public bool RunTests() {

} catch (OutOfMemoryException) {
Console.WriteLine("Large Memory Machine required");
return false;
return true;
} catch (Exception e) {
Console.WriteLine("Unexpected Exception:");
Console.WriteLine(e);
Expand Down
2 changes: 1 addition & 1 deletion src/tests/GC/LargeMemory/API/gc/reregisterforfinalize.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public bool RunTests() {
CreateLargeObject();
} catch (OutOfMemoryException) {
Console.WriteLine("Large Memory Machine required");
return false;
return true;
} catch (Exception e) {
Console.WriteLine("Unexpected Exception:");
Console.WriteLine(e);
Expand Down
2 changes: 1 addition & 1 deletion src/tests/GC/LargeMemory/API/gc/suppressfinalize.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public bool RunTests() {
GC.SuppressFinalize(lo);
} catch (OutOfMemoryException) {
Console.WriteLine("Large Memory Machine required");
return false;
return true;
} catch (Exception e) {
Console.WriteLine("Unexpected Exception:");
Console.WriteLine(e);
Expand Down
4 changes: 2 additions & 2 deletions src/tests/GC/LargeMemory/Allocation/finalizertest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ bool resurrectionTest() {
DestroyLargeObject();
} catch (OutOfMemoryException) {
Console.WriteLine("Large Memory Machine required");
return false;
return true;
} catch (Exception e) {
Console.WriteLine("Unexpected Exception");
Console.WriteLine(e.ToString());
Expand Down Expand Up @@ -119,7 +119,7 @@ bool allocateInFinalizerTest() {
new FinalizerObject(size);
} catch (OutOfMemoryException) {
Console.WriteLine("Large Memory Machine required");
return false;
return true;
} catch (Exception e) {
Console.WriteLine("Unexpected Exception");
Console.WriteLine(e.ToString());
Expand Down
2 changes: 1 addition & 1 deletion src/tests/GC/LargeMemory/Allocation/largeexceptiontest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public bool RunTests() {
throw new LargeException(size);
} catch (OutOfMemoryException) {
Console.WriteLine("Large Memory Machine required");
return false;
return true;
} catch (LargeException) {
return true;
} catch (Exception e) {
Expand Down

0 comments on commit 197ae4c

Please sign in to comment.