[Core] Remove delete_creating_tasks (#12962)

This commit is contained in:
Kai Yang
2020-12-22 00:01:27 +08:00
committed by GitHub
parent 6e354690b6
commit 5a6801dde7
36 changed files with 33 additions and 313 deletions
@@ -128,7 +128,7 @@ public class ActorTest extends BaseTest {
ObjectRef value = counter.task(Counter::getValue).remote();
Assert.assertEquals(100, value.get());
// Delete the object from the object store.
Ray.internal().free(ImmutableList.of(value), false, false);
Ray.internal().free(ImmutableList.of(value), false);
// Wait for delete RPC to propagate
TimeUnit.SECONDS.sleep(1);
// Free deletes from in-memory store.
@@ -138,7 +138,7 @@ public class ActorTest extends BaseTest {
ObjectRef<TestUtils.LargeObject> largeValue = counter.task(Counter::createLargeObject).remote();
Assert.assertTrue(largeValue.get() instanceof TestUtils.LargeObject);
// Delete the object from the object store.
Ray.internal().free(ImmutableList.of(largeValue), false, false);
Ray.internal().free(ImmutableList.of(largeValue), false);
// Wait for delete RPC to propagate
TimeUnit.SECONDS.sleep(1);
// Free deletes big objects from plasma store.
@@ -3,9 +3,7 @@ package io.ray.test;
import com.google.common.collect.ImmutableList;
import io.ray.api.ObjectRef;
import io.ray.api.Ray;
import io.ray.api.id.TaskId;
import io.ray.runtime.object.ObjectRefImpl;
import java.util.Arrays;
import org.testng.Assert;
import org.testng.annotations.Test;
@@ -20,7 +18,7 @@ public class PlasmaFreeTest extends BaseTest {
ObjectRef<String> helloId = Ray.task(PlasmaFreeTest::hello).remote();
String helloString = helloId.get();
Assert.assertEquals("hello", helloString);
Ray.internal().free(ImmutableList.of(helloId), true, false);
Ray.internal().free(ImmutableList.of(helloId), true);
final boolean result = TestUtils.waitForCondition(() ->
!TestUtils.getRuntime().getObjectStore()
@@ -32,19 +30,4 @@ public class PlasmaFreeTest extends BaseTest {
Assert.assertFalse(result);
}
}
@Test(groups = {"cluster"})
public void testDeleteCreatingTasks() {
ObjectRef<String> helloId = Ray.task(PlasmaFreeTest::hello).remote();
Assert.assertEquals("hello", helloId.get());
Ray.internal().free(ImmutableList.of(helloId), true, true);
TaskId taskId = TaskId.fromBytes(
Arrays.copyOf(((ObjectRefImpl<String>) helloId).getId().getBytes(), TaskId.LENGTH));
final boolean result = TestUtils.waitForCondition(
() -> !TestUtils.getRuntime().getGcsClient()
.rayletTaskExistsInGcs(taskId), 50);
Assert.assertTrue(result);
}
}