Repository: reef
Updated Branches:
  refs/heads/master d9a390303 -> 6977d2291


[REEF-1476] Fix race condition in TestTwoSuccessiveTasksOnSameContext

This addressed the issue by
  * Join the task thread before checking the task status.

JIRA:
  [REEF-1476](https://issues.apache.org/jira/browse/REEF-1476)

Pull request:
  This closes #1060


Project: http://git-wip-us.apache.org/repos/asf/reef/repo
Commit: http://git-wip-us.apache.org/repos/asf/reef/commit/6977d229
Tree: http://git-wip-us.apache.org/repos/asf/reef/tree/6977d229
Diff: http://git-wip-us.apache.org/repos/asf/reef/diff/6977d229

Branch: refs/heads/master
Commit: 6977d22915d13d7d62c2b770b3f8ae9335aa094f
Parents: d9a3903
Author: Andrew Chung <[email protected]>
Authored: Tue Jun 28 15:33:12 2016 -0700
Committer: Mariia Mykhailova <[email protected]>
Committed: Wed Jun 29 10:44:04 2016 -0700

----------------------------------------------------------------------
 lang/cs/Org.Apache.REEF.Evaluator.Tests/ContextRuntimeTests.cs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/reef/blob/6977d229/lang/cs/Org.Apache.REEF.Evaluator.Tests/ContextRuntimeTests.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Evaluator.Tests/ContextRuntimeTests.cs 
b/lang/cs/Org.Apache.REEF.Evaluator.Tests/ContextRuntimeTests.cs
index 084d2fc..80f7496 100644
--- a/lang/cs/Org.Apache.REEF.Evaluator.Tests/ContextRuntimeTests.cs
+++ b/lang/cs/Org.Apache.REEF.Evaluator.Tests/ContextRuntimeTests.cs
@@ -291,10 +291,10 @@ namespace Org.Apache.REEF.Evaluator.Tests
                 testTask.StartEvent.Wait();
                 testTask.CountDownEvent.Signal();
                 testTask.StopEvent.Wait();
-                Assert.False(contextRuntime.GetTaskStatus().IsPresent());
-
                 taskThread.Join();
 
+                Assert.False(contextRuntime.GetTaskStatus().IsPresent());
+
                 taskThread = contextRuntime.StartTaskOnNewThread(taskConfig);
                 var secondTestTask = contextRuntime.TaskRuntime.Value.Task as 
TestTask;
                 if (secondTestTask == null)

Reply via email to