You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@reef.apache.org by we...@apache.org on 2017/06/05 16:47:10 UTC
reef git commit: [REEF-1804] Make
TestFailMapperEvaluatorsWithFailedResultHandlerOnDispose more lenient
Repository: reef
Updated Branches:
refs/heads/master 9b2bcb5bc -> 4811a5d79
[REEF-1804] Make TestFailMapperEvaluatorsWithFailedResultHandlerOnDispose more lenient
JIRA:
[REEF-1804](https://issues.apache.org/jira/browse/REEF-1804)
Pull Request:
This closes #1311
Project: http://git-wip-us.apache.org/repos/asf/reef/repo
Commit: http://git-wip-us.apache.org/repos/asf/reef/commit/4811a5d7
Tree: http://git-wip-us.apache.org/repos/asf/reef/tree/4811a5d7
Diff: http://git-wip-us.apache.org/repos/asf/reef/diff/4811a5d7
Branch: refs/heads/master
Commit: 4811a5d7920d2e964031de980ebf30ad6f74e93d
Parents: 9b2bcb5
Author: Julia Wang <ju...@apache.org>
Authored: Wed May 31 20:21:45 2017 -0700
Committer: Markus Weimer <we...@apache.org>
Committed: Mon Jun 5 09:44:17 2017 -0700
----------------------------------------------------------------------
...valuatorsWithFailedResultHandlerOnDispose.cs | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/reef/blob/4811a5d7/lang/cs/Org.Apache.REEF.Tests/Functional/IMRU/TestFailMapperEvaluatorsWithFailedResultHandlerOnDispose.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tests/Functional/IMRU/TestFailMapperEvaluatorsWithFailedResultHandlerOnDispose.cs b/lang/cs/Org.Apache.REEF.Tests/Functional/IMRU/TestFailMapperEvaluatorsWithFailedResultHandlerOnDispose.cs
index 10deef6..c7a0c4b 100644
--- a/lang/cs/Org.Apache.REEF.Tests/Functional/IMRU/TestFailMapperEvaluatorsWithFailedResultHandlerOnDispose.cs
+++ b/lang/cs/Org.Apache.REEF.Tests/Functional/IMRU/TestFailMapperEvaluatorsWithFailedResultHandlerOnDispose.cs
@@ -67,13 +67,25 @@ namespace Org.Apache.REEF.Tests.Functional.IMRU
Assert.Equal(numTasks, runningTaskCount);
// Tasks should fail or complete or disappear with failed evaluator
- Assert.Equal(numTasks, completedTaskCount + failedEvaluatorCount + failedTaskCount);
-
+ // However, if the updateTask is completed before receiving Close event from the driver,
+ // TaskRuntime informs the driver about the result before throwing exception caused by the dispose in
+ // the result handler, that may end up two events from the update task/evaluator, one is CompletedTask,
+ // the other is FailedEvaluator
+ var total = completedTaskCount + failedEvaluatorCount + failedTaskCount;
+ var faildMsg = string.Format(
+ "Expected total events: {0}, actual number of events {1}, completedTaskCount: {2}, failedEvaluatorCount: {3}, failedTaskCount: {4}.",
+ numTasks,
+ total,
+ completedTaskCount,
+ failedEvaluatorCount,
+ failedTaskCount);
+ Assert.True(numTasks == total || numTasks == total - 1, faildMsg);
+
// We have failed two mappers and one update evaluator in the test code. As the update evaluator failure
// happens in Dispose(), driver may/may not receive FailedEvaluator before shut down.
- Assert.True(failedEvaluatorCount <= 3 && failedEvaluatorCount >= 2);
+ Assert.True(failedEvaluatorCount <= 3 && failedEvaluatorCount >= 2, "failedEvaluatorCount is " + failedEvaluatorCount);
- // eventually job fail because master evaluator fail before the iteration is completed
+ // eventually job fails because master evaluator fails before the iteration is completed
Assert.Equal(0, jobSuccess);
CleanUp(testFolder);
}