Repository: reef
Updated Branches:
  refs/heads/master 6742441cb -> 9ce210313


[REEF-1476] Fix race condition in TestTwoSuccessiveTasksOnSameContext

This makes sure the test joins the task thread before checking the task status.

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

Pull request:
  This closes #1062


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

Branch: refs/heads/master
Commit: 9ce210313c02fbf7add605501b40e0480f1533a9
Parents: 6742441
Author: Andrew Chung <[email protected]>
Authored: Wed Jun 29 15:01:05 2016 -0700
Committer: Markus Weimer <[email protected]>
Committed: Wed Jun 29 16:12:26 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/9ce21031/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 80f7496..bfeead6 100644
--- a/lang/cs/Org.Apache.REEF.Evaluator.Tests/ContextRuntimeTests.cs
+++ b/lang/cs/Org.Apache.REEF.Evaluator.Tests/ContextRuntimeTests.cs
@@ -309,10 +309,10 @@ namespace Org.Apache.REEF.Evaluator.Tests
 
                 secondTestTask.CountDownEvent.Signal();
                 secondTestTask.StopEvent.Wait();
+                taskThread.Join();
+
                 Assert.False(contextRuntime.GetTaskStatus().IsPresent());
                 secondTestTask.DisposedEvent.Wait();
-
-                taskThread.Join();
             }
         }
 

Reply via email to