Java gc tests failure fix
Sometimes the GC just won't run the finalizers, so we output a warning instead of throwing an error, so now the test-suite will pass but with a warning if the number of objects is not as expected. Was notably failing on RHEL6 using OpenSUSE build testing with openjdk-1.6
This commit is contained in:
parent
0577ff2220
commit
8441e3eab4
3 changed files with 4 additions and 4 deletions
|
|
@ -53,7 +53,7 @@ public class java_director_runme {
|
|||
};
|
||||
int actualCount = Quux.instances();
|
||||
if (actualCount != expectedCount)
|
||||
throw new RuntimeException("Expected count: " + expectedCount + " Actual count: " + actualCount);
|
||||
System.err.println("GC failed to run (java_director). Expected count: " + expectedCount + " Actual count: " + actualCount); // Finalizers are not guaranteed to be run and sometimes they just don't
|
||||
}
|
||||
|
||||
/* Test Quux1's director disconnect method rename */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue