Author: mattf
Date: Tue Jun 7 19:22:09 2011
New Revision: 1133133
URL: http://svn.apache.org/viewvc?rev=1133133&view=rev
Log:
HDFS-2044. TestQueueProcessingStatistics failing automatic test due to timing
issues (mattf)
Modified:
hadoop/common/branches/branch-0.20-security-205/CHANGES.txt
hadoop/common/branches/branch-0.20-security-205/src/test/org/apache/hadoop/util/TestQueueProcessingStatistics.java
Modified: hadoop/common/branches/branch-0.20-security-205/CHANGES.txt
URL:
http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-205/CHANGES.txt?rev=1133133&r1=1133132&r2=1133133&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-205/CHANGES.txt (original)
+++ hadoop/common/branches/branch-0.20-security-205/CHANGES.txt Tue Jun 7
19:22:09 2011
@@ -59,6 +59,9 @@ Release 0.20.205.0 - unreleased
MAPREDUCE-2529. Add support for regex-based shuffle metric counting
exceptions. (Thomas Graves via cdouglas)
+ HDFS-2044. TestQueueProcessingStatistics failing automatic test due to
+ timing issues. (mattf)
+
Release 0.20.204.0 - unreleased
NEW FEATURES
Modified:
hadoop/common/branches/branch-0.20-security-205/src/test/org/apache/hadoop/util/TestQueueProcessingStatistics.java
URL:
http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-205/src/test/org/apache/hadoop/util/TestQueueProcessingStatistics.java?rev=1133133&r1=1133132&r2=1133133&view=diff
==============================================================================
---
hadoop/common/branches/branch-0.20-security-205/src/test/org/apache/hadoop/util/TestQueueProcessingStatistics.java
(original)
+++
hadoop/common/branches/branch-0.20-security-205/src/test/org/apache/hadoop/util/TestQueueProcessingStatistics.java
Tue Jun 7 19:22:09 2011
@@ -89,6 +89,13 @@ public class TestQueueProcessingStatisti
//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 TestQueueProcessingStatisti
qStats.clockDuration,
qStats.processDuration
+ cycleDelay * (qStats.cycleCount - (qStats.cycleCount > 0 ? 1 :
0)));
+ */
}
assertTrue(failMsg(), qStats.workItemCount >= 0);
assertTrue(failMsg(), qStats.cycleCount >= 0);