提交 68d67e38 编写于 作者: S sla

7198849: Make javax/management/remote/mandatory/notif/ListenerScaleTest.java less timing sensitive

Reviewed-by: alanb
上级 0294e23e
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
* *
* As usual with timing-sensitive tests, we could potentially get * As usual with timing-sensitive tests, we could potentially get
* sporadic failures. We fail if the ratio of the time with many * sporadic failures. We fail if the ratio of the time with many
* MBeans to the time with just one MBean is more than 100. With the * MBeans to the time with just one MBean is more than 500. With the
* fix in place, it is usually less than 1, presumably because some * fix in place, it is usually less than 1, presumably because some
* code was being interpreted during the first measurement but had * code was being interpreted during the first measurement but had
* been compiled by the second. * been compiled by the second.
...@@ -176,7 +176,7 @@ public class ListenerScaleTest { ...@@ -176,7 +176,7 @@ public class ListenerScaleTest {
long manyMBeansTime = timeNotif(mbs); long manyMBeansTime = timeNotif(mbs);
System.out.println("Time with many MBeans: " + manyMBeansTime + "ns"); System.out.println("Time with many MBeans: " + manyMBeansTime + "ns");
double ratio = (double) manyMBeansTime / singleMBeanTime; double ratio = (double) manyMBeansTime / singleMBeanTime;
if (ratio > 100.0) if (ratio > 500.0)
throw new Exception("Failed: ratio=" + ratio); throw new Exception("Failed: ratio=" + ratio);
System.out.println("Test passed: ratio=" + ratio); System.out.println("Test passed: ratio=" + ratio);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册