db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Myrna van Lunteren <m.v.lunte...@gmail.com>
Subject re DERBY-88
Date Wed, 08 Feb 2006 03:59:10 GMT
Hi,

I happened to notice that indeed, the problem as described is still
occurring.

If I understand the problem, we don't actually want 'accurate' rounding when
the percentage of failure gets small...?

We don't want to get the impression that all tests passed (100%) in
combination with seeing a failure.
I am wondering if a forced adjustment of the percentage would be acceptable?

I am thinking of the following adjustment to
../functionTests/harness/GenerateReport.java:
-----------------------------------------------------
@@ -187,7 +187,13 @@
                NumRun = NumPass+NumFail;
                NumSkip = CountLines (skipFileName);
                PercentPass = (int)Math.ceil(100*
((double)NumPass/(double)NumRun));
+               // use brute force to not get 100% pass if there's even 1
failure.
+               if ((PercentPass == 100) && (NumFail != 0))
+                       PercentPass = 99;
                PercentFail = (int)Math.floor(100*
((double)NumFail/(double)NumRun));
+              // use brute force to not get 0% fail if there's even 1
failure.
+               if ((PercentFail == 0) && (NumFail != 0))
+                       PercentFail = 1;
        }
------------------------------------------------------

If something like this would be ok, I can make a patch for it...

Mime
View raw message