mirror of
https://github.com/wassname/ray.git
synced 2026-07-07 21:02:05 +08:00
[PlacementGroup]Add PlacementGroup wait java api (#12499)
* add part code * add part code * add part code * add part code * fix review comments * fix compile bug * fix compile bug * fix review comments * fix review comments * fix code style * add part code * fix review comments * fix review comments * fix code style * rebase master * fix bug * fix lint error * fix compile bug * fix newline issue Co-authored-by: 灵洵 <fengbin.ffb@antgroup.com>
This commit is contained in:
@@ -31,8 +31,10 @@ public class PlacementGroupTest extends BaseTest {
|
||||
// This test just creates a placement group with one bundle.
|
||||
// It's not comprehensive to test all placement group test cases.
|
||||
public void testCreateAndCallActor() {
|
||||
PlacementGroup placementGroup = PlacementGroupTestUtils.createSimpleGroup();
|
||||
Assert.assertEquals(((PlacementGroupImpl)placementGroup).getName(),"unnamed_group");
|
||||
PlacementGroupImpl placementGroup = (PlacementGroupImpl)PlacementGroupTestUtils
|
||||
.createSimpleGroup();
|
||||
Assert.assertTrue(placementGroup.wait(10000));
|
||||
Assert.assertEquals(placementGroup.getName(),"unnamed_group");
|
||||
|
||||
// Test creating an actor from a constructor.
|
||||
ActorHandle<Counter> actor = Ray.actor(Counter::new, 1)
|
||||
@@ -52,6 +54,8 @@ public class PlacementGroupTest extends BaseTest {
|
||||
PlacementGroupImpl secondPlacementGroup = (PlacementGroupImpl)PlacementGroupTestUtils
|
||||
.createNameSpecifiedSimpleGroup("CPU", 1, PlacementStrategy.PACK,
|
||||
1.0, "second_placement_group");
|
||||
Assert.assertTrue(firstPlacementGroup.wait(10000));
|
||||
Assert.assertTrue(secondPlacementGroup.wait(10000));
|
||||
|
||||
PlacementGroupImpl firstPlacementGroupRes =
|
||||
(PlacementGroupImpl)Ray.getPlacementGroup((firstPlacementGroup).getId());
|
||||
|
||||
Reference in New Issue
Block a user