Skip to content

Commit 8e39542

Browse files
committed
add java code and doc lint to the CI
1 parent 38ab370 commit 8e39542

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

java/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141
<encoding>UTF-8</encoding>
142142
<consoleOutput>true</consoleOutput>
143143
<failsOnError>false</failsOnError>
144-
<failOnViolation>false</failOnViolation>
144+
<failOnViolation>true</failOnViolation>
145145
<violationSeverity>warning</violationSeverity>
146146
<format>xml</format>
147147
<format>html</format>

java/test.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,10 @@ mvn clean install -pl plasma -am -Dmaven.test.skip
77
popd
88
pushd $ROOT_DIR/../java
99
mvn clean install -Dmaven.test.skip
10-
mvn test
10+
check_style=$(mvn checkstyle:check)
11+
echo "${check_style}"
12+
[[ ${check_style} =~ "BUILD FAILURE" ]] && exit 1
13+
mvn_test=$(mvn test)
14+
echo "${mvn_test}"
15+
[[ ${mvn_test} =~ "BUILD SUCCESS" ]] || exit 1
1116
popd

java/test/src/main/java/org/ray/api/test/UniqueIDTest.java renamed to java/test/src/main/java/org/ray/api/test/UIdTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
import org.ray.core.UniqueIdHelper;
1212

1313
@RunWith(MyRunner.class)
14-
public class UniqueIdTest {
14+
public class UIdTest {
15+
1516

1617
@RayRemote
1718
public static String hi(Integer i) {
@@ -23,7 +24,7 @@ public void test() {
2324
UniqueID tid = UniqueIdHelper.nextTaskId(0xdeadbeefL);
2425
UniqueIdHelper.setTest(tid, true);
2526
System.out.println("Tested task id = " + tid);
26-
RayFunc_1_1<Integer, String> f = UniqueIdTest::hi;
27+
RayFunc_1_1<Integer, String> f = UIdTest::hi;
2728
RayObject<String> result = new RayObject<>(
2829
RayRuntime.getInstance().call(
2930
tid,

0 commit comments

Comments
 (0)