فهرست منبع

HDFS-2044. TestQueueProcessingStatistics failing automatic test due to
timing issues. (mattf)


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

Owen O'Malley 14 سال پیش
والد
کامیت
de15dfb036
2فایلهای تغییر یافته به همراه11 افزوده شده و 0 حذف شده
  1. 3 0
      CHANGES.txt
  2. 8 0
      src/test/org/apache/hadoop/util/TestQueueProcessingStatistics.java

+ 3 - 0
CHANGES.txt

@@ -11,6 +11,9 @@ Release 0.20.204.0 - unreleased
 
   BUG FIXES
 
+    HDFS-2044. TestQueueProcessingStatistics failing automatic test due to 
+    timing issues. (mattf)
+
     MAPREDUCE-2558. Add queue-level metrics 0.20-security branch - test fix
     (jeffrey nasbit via mahadev)
     

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