mirror of
https://github.com/wassname/ray.git
synced 2026-06-29 03:04:28 +08:00
[Core] Added support for submission-time task names. (#10449)
* Added support for submission-time task names. * Suggestions from code review: add missing consts Co-authored-by: SangBin Cho <rkooo567@gmail.com> * Add num_returns arg to actor method options docstring example. * Add process name line and proctitle assertion to submission-time task name section of advanced docs. * Add submission-time task name --> proctitle test for Python worker. * Added Python actor options tests for num_returns and name. * Added Java test for submission-time task names. * Add dashboard image to task name docs section. * Move to fstrings. Co-authored-by: SangBin Cho <rkooo567@gmail.com>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package io.ray.test;
|
||||
|
||||
import io.ray.api.Ray;
|
||||
import org.testng.Assert;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/** Task Name Test. */
|
||||
public class TaskNameTest extends BaseTest {
|
||||
|
||||
private static int testFoo() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** Test setting task name at task submission time. */
|
||||
@Test
|
||||
public void testSetName() {
|
||||
Assert.assertEquals(0, (int) Ray.task(TaskNameTest::testFoo).setName("foo").remote().get());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user