8249953: Shenandoah: gc/shenandoah/mxbeans tests should account for corner cases

Reviewed-by: rkennke
This commit is contained in:
Aleksey Shipilev 2020-07-23 12:46:24 +02:00
parent 63d2421c3b
commit dc80e63811
2 changed files with 4 additions and 4 deletions

View File

@ -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);

View File

@ -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);