|
|
@ -74,21 +74,21 @@ public class MasterTaskExecThreadTest { |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|
public void testExistsValidWorkerGroup2() { |
|
|
|
public void testExistsValidWorkerGroup2() { |
|
|
|
Set<String> workerGorups = new HashSet<>(); |
|
|
|
Set<String> workerGroups = new HashSet<>(); |
|
|
|
workerGorups.add("test1"); |
|
|
|
workerGroups.add("test1"); |
|
|
|
workerGorups.add("test2"); |
|
|
|
workerGroups.add("test2"); |
|
|
|
|
|
|
|
|
|
|
|
/* Mockito.when(registryCenter.getWorkerGroupDirectly()).thenReturn(workerGorups); |
|
|
|
/* Mockito.when(registryCenter.getWorkerGroupDirectly()).thenReturn(workerGroups); |
|
|
|
boolean b = masterTaskExecThread.existsValidWorkerGroup("default"); |
|
|
|
boolean b = masterTaskExecThread.existsValidWorkerGroup("default"); |
|
|
|
Assert.assertFalse(b);*/ |
|
|
|
Assert.assertFalse(b);*/ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|
public void testExistsValidWorkerGroup3() { |
|
|
|
public void testExistsValidWorkerGroup3() { |
|
|
|
Set<String> workerGorups = new HashSet<>(); |
|
|
|
Set<String> workerGroups = new HashSet<>(); |
|
|
|
workerGorups.add("test1"); |
|
|
|
workerGroups.add("test1"); |
|
|
|
/* Mockito.when(registryCenter.getWorkerGroupDirectly()).thenReturn(workerGorups); |
|
|
|
/* Mockito.when(registryCenter.getWorkerGroupDirectly()).thenReturn(workerGroups); |
|
|
|
Mockito.when(registryCenter.getWorkerGroupNodesDirectly("test1")).thenReturn(workerGorups); |
|
|
|
Mockito.when(registryCenter.getWorkerGroupNodesDirectly("test1")).thenReturn(workerGroups); |
|
|
|
boolean b = masterTaskExecThread.existsValidWorkerGroup("test1"); |
|
|
|
boolean b = masterTaskExecThread.existsValidWorkerGroup("test1"); |
|
|
|
Assert.assertTrue(b);*/ |
|
|
|
Assert.assertTrue(b);*/ |
|
|
|
} |
|
|
|
} |
|
|
|