wonook commented on a change in pull request #57: [NEMO-73,75] SchedulingPolicy 
as Vertex-level Execution Property
URL: https://github.com/apache/incubator-nemo/pull/57#discussion_r199048126
 
 

 ##########
 File path: 
runtime/master/src/test/java/edu/snu/nemo/runtime/master/scheduler/SourceLocationAwareSchedulingConstraintTest.java
 ##########
 @@ -46,29 +49,29 @@ private static ExecutorRepresenter 
mockExecutorRepresenter(final String executor
   }
 
   /**
-   * {@link SourceLocationAwareSchedulingPolicy} should fail to schedule a 
{@link Task} when
+   * {@link SourceLocationAwareSchedulingConstraint} should fail to schedule a 
{@link Task} when
    * there are no executors in appropriate location(s).
    */
   @Test
   public void testSourceLocationAwareSchedulingNotAvailable() {
-    final SchedulingPolicy schedulingPolicy = new 
SourceLocationAwareSchedulingPolicy();
+    final SchedulingConstraint schedulingConstraint = new 
SourceLocationAwareSchedulingConstraint();
 
     // Prepare test scenario
     final Task task = CreateTask.withReadablesWithSourceLocations(
         Collections.singletonList(Collections.singletonList(SITE_0)));
     final ExecutorRepresenter e0 = mockExecutorRepresenter(SITE_1);
     final ExecutorRepresenter e1 = mockExecutorRepresenter(SITE_1);
 
-    assertEquals(Collections.emptySet(),
-        schedulingPolicy.filterExecutorRepresenters(new 
HashSet<>(Arrays.asList(e0, e1)), task));
+    assertEquals(Collections.emptySet(), Arrays.asList(e0, e1).stream()
+        .filter(e -> schedulingConstraint.testSchedulability(e, 
task)).collect(Collectors.toSet()));
 
 Review comment:
   newline!!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to