RestComm / jain-slee

The World's #1 Open Source JAIN-SLEE (JSLEE) 1.1 Implementation
http://www.restcomm.com/
GNU Affero General Public License v3.0
25 stars 50 forks source link

[Usage] Display proper value of sample attribute, rather than MIN/MAX #55

Closed baranowb closed 7 years ago

baranowb commented 8 years ago

diff --git a/container/usage/src/main/java/org/mobicents/slee/runtime/usage/UsageParameter.java b/container/usage/src/main/java/org/mobicents/slee/runtime/usage/UsageParameter.java index a5c2d99..ce946d0 100644 --- a/container/usage/src/main/java/org/mobicents/slee/runtime/usage/UsageParameter.java +++ b/container/usage/src/main/java/org/mobicents/slee/runtime/usage/UsageParameter.java @@ -47,6 +47,7 @@ public class UsageParameter implements Serializable { // NOTE: it seems that javassit does some sort of magic here - cause with // generated code and "long" tck passes ... // private long value;

@@ -86,6 +90,9 @@ public class UsageParameter implements Serializable { }

    public long getMax() {
SergeyLee commented 8 years ago

This fix cause TCK assertion:

Failed assertion ID: 4642 Failure context/reason: Exception: com.opencloud.sleetck.lib.TCKTestFailureException => SampleStatistics.getMinimum() returned an invalid value. Expected=9223372036854775807; minimum value returned=0; Sample set:{} Stack Trace: com.opencloud.sleetck.lib.TCKTestFailureException: SampleStatistics.getMinimum() returned an invalid value. Expected=9223372036854775807; minimum value returned=0; Sample set:{} at com.opencloud.sleetck.lib.testsuite.javax.slee.usage.SampleStatistics.SampleStatisticsTest.auditStatistics(SampleStatisticsTest.java:114) at com.opencloud.sleetck.lib.testsuite.javax.slee.usage.SampleStatistics.SampleStatisticsTest.testSampleSet(SampleStatisticsTest.java:49) at com.opencloud.sleetck.lib.testsuite.javax.slee.usage.SampleStatistics.SampleStatisticsTest.run(SampleStatisticsTest.java:40) at com.opencloud.sleetck.lib.infra.SleeTCKScript.run(Unknown Source) at com.sun.javatest.Script.run(Script.java:213) at com.sun.javatest.Harness.runTest(Harness.java:695) at com.sun.javatest.Harness.access$900(Harness.java:27) at com.sun.javatest.Harness$2.run(Harness.java:854)