8249953: Shenandoah: gc/shenandoah/mxbeans tests should account for corner cases
Reviewed-by: rkennke
This commit is contained in:
parent
63d2421c3b
commit
dc80e63811
@ -167,7 +167,7 @@ public class TestChurnNotifications {
|
||||
long maxExpected = mem + HEAP_MB * 1024 * 1024;
|
||||
|
||||
String msg = "Expected = [" + minExpected / M + "; " + maxExpected / M + "] (" + mem / M + "), actual = " + actual / M;
|
||||
if (minExpected < actual && actual < maxExpected) {
|
||||
if (minExpected <= actual && actual <= maxExpected) {
|
||||
System.out.println(msg);
|
||||
} else {
|
||||
throw new IllegalStateException(msg);
|
||||
|
@ -158,7 +158,7 @@ public class TestPauseNotifications {
|
||||
|
||||
{
|
||||
String msg = "Pauses expected = [" + minExpected + "; " + maxExpected + "], actual = " + pausesActual;
|
||||
if (minExpected < pausesActual && pausesActual < maxExpected) {
|
||||
if (minExpected <= pausesActual && pausesActual <= maxExpected) {
|
||||
System.out.println(msg);
|
||||
} else {
|
||||
throw new IllegalStateException(msg);
|
||||
@ -167,7 +167,7 @@ public class TestPauseNotifications {
|
||||
|
||||
{
|
||||
String msg = "Cycles expected = [" + minExpected + "; " + maxExpected + "], actual = " + cyclesActual;
|
||||
if (minExpected < cyclesActual && cyclesActual < maxExpected) {
|
||||
if (minExpected <= cyclesActual && cyclesActual <= maxExpected) {
|
||||
System.out.println(msg);
|
||||
} else {
|
||||
throw new IllegalStateException(msg);
|
||||
@ -176,7 +176,7 @@ public class TestPauseNotifications {
|
||||
|
||||
{
|
||||
String msg = "Cycle duration (" + cyclesActual + "), pause duration (" + pausesActual + ")";
|
||||
if (pausesActual < cyclesActual) {
|
||||
if (pausesActual <= cyclesActual) {
|
||||
System.out.println(msg);
|
||||
} else {
|
||||
throw new IllegalStateException(msg);
|
||||
|
Loading…
Reference in New Issue
Block a user