Explorar el Código

commit 170943b5880d588dd722b9640e52873cabf3a421
Author: Matt Foley <mattf@yahoo-inc.com>
Date: Thu Feb 10 00:05:54 2011 -0800

. Modified TestQueueProcessingStatistics to remove
timing-sensitive statements in unit test.

+++ b/YAHOO-CHANGES.txt
+ . Add statistics logging to Fred for better visibility into
+ startup time costs. (Matt Foley) [modified per to remove
+ timing-sensitive statements in unit tests]
+


git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20-security-203@1077801 13f79535-47bb-0310-9956-ffa450edef68

Owen O'Malley hace 14 años
padre
commit
a91552f29c

+ 0 - 5
CHANGES.txt

@@ -2,11 +2,6 @@ Hadoop Change Log
 
 Release 0.20.3 - Unreleased
 
-  IMPROVEMENTS
-
-    BZ-4182948. Add statistics logging to Fred for better visibility into
-    startup time costs. (Matt Foley)
-
   BUG FIXES
 
     HDFS-955. New implementation of saveNamespace() to avoid loss of edits 

+ 8 - 0
src/test/org/apache/hadoop/util/TestQueueProcessingStatistics.java

@@ -89,6 +89,13 @@ public class TestQueueProcessingStatistics extends junit.framework.TestCase {
     //Asserts based on general principles
     assertTrue(failMsg(), qStats.startTime >= 0);
     if (qStats.state != State.BEGIN_COLLECTING) {
+      /* The following timing calculations don't work in many 
+       * automated test environments (e.g., on heavily loaded servers with
+       * very unreliable "sleep()" durations), but are useful during 
+       * development work.  Commenting them out but leaving them here 
+       * for dev use.
+       */
+      /*
       assertAlmostEquals(failMsg() + " inCycle=" + inCycle, 
           qStats.startTimeCurrentCycle, 
           qStats.startTime 
@@ -100,6 +107,7 @@ public class TestQueueProcessingStatistics extends junit.framework.TestCase {
           qStats.clockDuration, 
           qStats.processDuration 
           + cycleDelay * (qStats.cycleCount - (qStats.cycleCount > 0 ? 1 : 0)));
+       */
     }
     assertTrue(failMsg(), qStats.workItemCount >= 0);
     assertTrue(failMsg(), qStats.cycleCount >= 0);