Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

Commit

Permalink
Address comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
afchung committed Jun 24, 2016
1 parent a1246e6 commit ec5f9e2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
Expand Up @@ -347,10 +347,8 @@ private void Check()
if (_result.IsPresent() && _lastException.IsPresent())
{
throw new ApplicationException(
"Both Exception and Result are present. One of the Threads have already sent a result back." + Environment.NewLine +
"Result returned " + _result.Value + "." + Environment.NewLine +
"Exception was " + _lastException.Value + "." + Environment.NewLine +
"Failing the process...");
string.Format("Both Exception and Result are present. One of the Threads have already sent a result back." +
"Result returned [{0}]. Exception was [{1}]. Failing the Evaluator.", _result.Value, _lastException.Value));
}
}

Expand Down
Expand Up @@ -20,7 +20,6 @@
using System.Text;
using System.Threading;
using Org.Apache.REEF.Common.Context;
using Org.Apache.REEF.Common.Runtime.Evaluator.Task;
using Org.Apache.REEF.Common.Tasks;
using Org.Apache.REEF.Common.Tasks.Events;
using Org.Apache.REEF.Driver;
Expand All @@ -32,7 +31,7 @@
using Org.Apache.REEF.Tang.Implementations.Tang;
using Org.Apache.REEF.Tang.Interface;
using Org.Apache.REEF.Tang.Util;
using Org.Apache.REEF.Utilities;
using Org.Apache.REEF.Tests.Functional.Bridge.Exceptions;
using Org.Apache.REEF.Utilities.Logging;
using Xunit;

Expand Down Expand Up @@ -176,7 +175,7 @@ public void OnNext(IFailedEvaluator value)
var e = value.EvaluatorException.InnerException;
Logger.Log(Level.Error, "In IFailedTask: e.type: {0}, e.message: {1}.", e.GetType(), e.Message);

Assert.Equal(typeof(Exception), e.GetType());
Assert.Equal(typeof(TestSerializableException), e.GetType());
Assert.Equal(TaskKilledByDriver, e.Message);
}

Expand Down Expand Up @@ -269,7 +268,7 @@ public void OnNext(ICloseEvent closeEvent)
}
else if (msg.Equals(ExitByException))
{
throw new Exception(TaskKilledByDriver);
throw new TestSerializableException(TaskKilledByDriver);
}
}
else
Expand Down

0 comments on commit ec5f9e2

Please sign in to comment.