You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@reef.apache.org by ju...@apache.org on 2016/12/06 02:02:11 UTC
reef git commit: [REEF-1464] Fix TestTaskCloseOnLocalRuntime failures
in AppVeyor
Repository: reef
Updated Branches:
refs/heads/master 977965c23 -> 5f6946150
[REEF-1464] Fix TestTaskCloseOnLocalRuntime failures in AppVeyor
Test failures are caused by delayed task cancellation,
which happens if task is trying to establish TCP connection with
an already cancelled task.
This change decreases time spent by task trying to establish
connection before failing (for this test only).
JIRA:
[REEF-1464](https://issues.apache.org/jira/browse/REEF-1464)
Pull request:
This closes #1199
Project: http://git-wip-us.apache.org/repos/asf/reef/repo
Commit: http://git-wip-us.apache.org/repos/asf/reef/commit/5f694615
Tree: http://git-wip-us.apache.org/repos/asf/reef/tree/5f694615
Diff: http://git-wip-us.apache.org/repos/asf/reef/diff/5f694615
Branch: refs/heads/master
Commit: 5f6946150b27bde30e7bed246053b58a49f599fb
Parents: 977965c
Author: Mariia Mykhailova <ma...@apache.org>
Authored: Wed Nov 23 11:48:47 2016 -0800
Committer: Julia Wang <jw...@yahoo.com>
Committed: Mon Dec 5 17:59:30 2016 -0800
----------------------------------------------------------------------
.../Functional/IMRU/IMRUCloseTaskTest.cs | 14 ++++++++++++--
.../Functional/ReefFunctionalTest.cs | 2 +-
2 files changed, 13 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/reef/blob/5f694615/lang/cs/Org.Apache.REEF.Tests/Functional/IMRU/IMRUCloseTaskTest.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tests/Functional/IMRU/IMRUCloseTaskTest.cs b/lang/cs/Org.Apache.REEF.Tests/Functional/IMRU/IMRUCloseTaskTest.cs
index 01a80fe..af1e758 100644
--- a/lang/cs/Org.Apache.REEF.Tests/Functional/IMRU/IMRUCloseTaskTest.cs
+++ b/lang/cs/Org.Apache.REEF.Tests/Functional/IMRU/IMRUCloseTaskTest.cs
@@ -21,6 +21,7 @@ using System.Diagnostics;
using Org.Apache.REEF.Driver.Evaluator;
using Org.Apache.REEF.Driver.Task;
using Org.Apache.REEF.IMRU.OnREEF.Driver;
+using Org.Apache.REEF.Network;
using Org.Apache.REEF.Tang.Annotations;
using Org.Apache.REEF.Tang.Interface;
using Org.Apache.REEF.Tang.Util;
@@ -58,7 +59,8 @@ namespace Org.Apache.REEF.Tests.Functional.IMRU
const int numOfRetryInRecovery = 4;
var testFolder = DefaultRuntimeFolder + TestId;
TestBroadCastAndReduce(false, numTasks, chunkSize, dims, iterations, mapperMemory, updateTaskMemory, numOfRetryInRecovery, testFolder);
- string[] lines = ReadLogFile(DriverStdout, "driver", testFolder, 120);
+ string[] lines = ReadLogFile(DriverStdout, "driver", testFolder);
+
var completedCount = GetMessageCount(lines, CompletedTaskMessage);
var failedCount = GetMessageCount(lines, FailedTaskMessage);
Assert.Equal(numTasks, completedCount + failedCount);
@@ -116,6 +118,14 @@ namespace Org.Apache.REEF.Tests.Functional.IMRU
.Build();
}
+ protected override IConfiguration GetTcpConnectionConfiguration()
+ {
+ return TcpClientConfigurationModule.ConfigurationModule
+ .Set(TcpClientConfigurationModule.MaxConnectionRetry, "5")
+ .Set(TcpClientConfigurationModule.SleepTime, "500")
+ .Build();
+ }
+
/// <summary>
/// Test handlers
/// </summary>
@@ -136,7 +146,7 @@ namespace Org.Apache.REEF.Tests.Functional.IMRU
{
lock (_lock)
{
- Logger.Log(Level.Info, "Received running task:" + value.Id);
+ Logger.Log(Level.Info, "Received running task:" + value.Id + " from container [" + value.ActiveContext.EvaluatorId + "]");
_runningTasks.Add(value.Id, value);
if (_runningTasks.Count == 4)
{
http://git-wip-us.apache.org/repos/asf/reef/blob/5f694615/lang/cs/Org.Apache.REEF.Tests/Functional/ReefFunctionalTest.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tests/Functional/ReefFunctionalTest.cs b/lang/cs/Org.Apache.REEF.Tests/Functional/ReefFunctionalTest.cs
index fee7ac3..7b06025 100644
--- a/lang/cs/Org.Apache.REEF.Tests/Functional/ReefFunctionalTest.cs
+++ b/lang/cs/Org.Apache.REEF.Tests/Functional/ReefFunctionalTest.cs
@@ -398,7 +398,7 @@ namespace Org.Apache.REEF.Tests.Functional
}
}
- private IConfiguration GetTcpConnectionConfiguration()
+ protected virtual IConfiguration GetTcpConnectionConfiguration()
{
return TcpClientConfigurationModule.ConfigurationModule
.Set(TcpClientConfigurationModule.MaxConnectionRetry, "150")